News for hackers. Stuff that matters.
Re:Show HN: HyperApp – 1k JavaScript framework for building ... by madmaniak on Tuesday May 22, 2018 @12:56PM (#17127400)
Another Virtual DOM thing - which is obviously wrong.
Re:Show HN: HyperApp – 1k JavaScript framework for building ... by dang on Tuesday May 22, 2018 @02:41PM (#17128362)
It's not ok to post like this to HN, and especially not in Show HN threads. Here are some of the rules it breaks:

Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something.

https://news.ycombinator.com/newsguidelines.html

Be respectful. [...] Instead of "you're doing it wrong", suggest alternatives. [...] don't be gratuitously negative.

https://news.ycombinator.com/showhn.html

Re:Show HN: HyperApp – 1k JavaScript framework for building ... by czechdeveloper on Tuesday May 22, 2018 @02:16PM (#17128139)
Can you explain (or link some source) why is Virtual DOM wrong? Actually curious.
Re:Show HN: HyperApp – 1k JavaScript framework for building ... by lhorie on Tuesday May 22, 2018 @03:52PM (#17128871)
Hi. I'm the author of Mithril (one of the virtual dom frameworks mentioned elsewhere in this thread), so I think can answer that.

To be honest, there's nothing inherently "wrong" with it. There are various techniques to implement templating engines and they all have pros and cons.

Lately, VDOM performance in micro benchmarks has sort of plateaued, and recently non-vdom systems like Svelte (an AOT compilation system) and Surplus (a KVO system) have been making some splash as potential candidates to surpass vdom performance. One could argue that it would be "wrong" or "a waste of time" to try to one-up template performance by attempting to make a new vdom implementation because existing ones are pretty much as optimized as they can be. Since there hasn't been nearly as much effort put into alternative algorithms, it probably would be more fruitful to explore a non-vdom approach instead.

Do note though that I'm talking about R&D sort of stuff above. For people building actual apps, vdom performance is generally good enough for a vast majority of real-world use cases (evidenced by React's popularity) and one of its appeals is that it lends itself to being manually optimizable it if you do end up with a ridiculously ginormous DOM.

Re:Show HN: HyperApp – 1k JavaScript framework for building ... by localvoid on Wednesday May 23, 2018 @12:29AM (#17131477)
> Since there hasn't been nearly as much effort put into alternative algorithms

Angular2+ team is actually have done an awesome job at experimenting in this problem space. And they've moved away from generating code that is similar to what Svelte does long time ago.

Re:Show HN: HyperApp – 1k JavaScript framework for building ... by cryodesign on Tuesday May 22, 2018 @05:24PM (#17129546)
Care to provide more details? Why is it wrong?