Live data from Hacker News

JSX is no longer my friend

medium.com

131–140 of 144 posts

Re: JSX is no longer my friend

#131
this might be the wrong place to ask this, but i've been noting a few trends over the last 20 years or so...

why are web-developers so damned clever? do we really need to do all of this to ourselves?

the web is just a port, a protocol, and a model for interaction, underneath it all.

why on earth can we not live with the existing web, and move on towards inventing other spaces?

a browser is just a shitty sandboxed OS with a declarative markup renderer. there's nothing to stop anyone from making a different client-side x-terminal... (as that's what people are trying to turn the web into, apparently)

Re: JSX is no longer my friend

#132

Earlier quoted context omitted.

I've also been using JSX since the good old days, when a component was just a function -- "hyperscript" (such as it is) was built right in. Notably, writing React apps in CoffeeScript was beautiful: div className: "greeting" "Hello, world!" As you pointed out, the biggest problem with JSX is not that it isn't JS, it's that it isn't HTML. It's a leaky abstraction. Camel casing is only the most obvious problem, things…

I'd like to learn enough to understand the statement "JSX is just a JS primary," and I can't find out what a "$lang primary" is in PLT. Can you point out some resources for me to figure this out?

The full name is primary expression. The meat of it is that a primary is usually just a literal value, identifier, or something in parentheses, but it varies based on the particular language.

For a deep dive you'll want to read resources about parsing. To name one article that came up recently on HN, take a look at "Why Parsing Tools are Hard" [0].

[0]: http://blog.reverberate.org/2013/09/ll-and-lr-in-context-why...

Re: JSX is no longer my friend

#133

Earlier quoted context omitted.

I'd like to learn enough to understand the statement "JSX is just a JS primary," and I can't find out what a "$lang primary" is in PLT. Can you point out some resources for me to figure this out?

The previous comment is trying to sound smart by using obscure terminology. I would guess they mean to say that JSX is a translated subset of JS?

Thanks for your generosity. This is what I was referring to: JSX extends the PrimaryExpression in the ECMAScript 6th Edition (ECMA-262) grammar.

Please take a look at the draft JSX spec [0] for details.

[0]: https://github.com/facebook/jsx

Re: JSX is no longer my friend

#134

Earlier quoted context omitted.

I've also been using JSX since the good old days, when a component was just a function -- "hyperscript" (such as it is) was built right in. Notably, writing React apps in CoffeeScript was beautiful: div className: "greeting" "Hello, world!" As you pointed out, the biggest problem with JSX is not that it isn't JS, it's that it isn't HTML. It's a leaky abstraction. Camel casing is only the most obvious problem, things…

In what sense are you using the word "primary" in "JSX is just a JS primary"? I have a passing interest in language theory and strong interest in PL theory, but I don't think I've seen usage that before.

The full name is primary expression, things like literal values, identifiers, and other expressions in parentheses.

Re: JSX is no longer my friend

#136

Earlier quoted context omitted.

That's what I don't like about a lot of bleeding-edge web development. You end up depending on a half-dozen abandoned pet projects. Somebody had an itch, scratched it, got bored. I swear half of the gulp eco-system is just that - half-abandoned, half-working little cute plugins that someone did because someone else's plugin, even though 99% identical, didn't do the one thing they wanted, so they wrote their own and t…

If a major framework hasn't had commits for a month that might indicate something. If it's just some random module that's small and has no major open issues, then that policy is unreasonable. Does your team regularly audit the commit streams of already-in-use dependencies so you can rip them out when the maintainers take a break?

It's more of a tongue-in-cheek thing but it was born out of real frustration. It really depends like you said - it helps to look at the source code and see if it is maintainable by our team in case it is abandoned.

Re: JSX is no longer my friend

#137

Earlier quoted context omitted.

In what sense are you using the word "primary" in "JSX is just a JS primary"? I have a passing interest in language theory and strong interest in PL theory, but I don't think I've seen usage that before.

The full name is primary expression, things like literal values, identifiers, and other expressions in parentheses.

Thanks!

Re: JSX is no longer my friend

#138
post #87

So I'm the guy who wrote the post in question. As the view counter started to exceed my expectations I thought there would be a fair amount of negative feedback. I was surprised that there wasn't much. Turns out that it's all here on HN! :P First off, I can't believe all of you actually read that. You have both my sympathy and thanks. Even more thanks for commenting on it. I want to address a few of the points brough…

FWIW my comment also blew up more than I woulda expected. I wasn't really responding to your article even, more to Andre's flavor over the top anti-JSX attitude. It's like you said: each team is different and should use what works for them, and making overblown arguments doesn't help that.

If I can double down on the mistake though, I'd be concerned if someone who didn't feel like learning how JSX works tried to dive into immmutables and combinators :D.

Thanks for react-hyperscript-helpers! Feels like react-native in a good way.

Re: JSX is no longer my friend

#139
post #28

After many Medium posts of uninformed, not very insightful complaints about react and the state of JavaScript I am becoming inclined to just avoid Medium posts about JavaScript in general. Medium has become the analog to Tumblr posts for opinionated engineers to whine about things that don't really impact development in ways that matter. Really all this developer had to do was talk about Hyperscript in a positive way…

This has been my view as well. Author comes off across as a 'tumblrina' and sort of obsessing over small annoyance rather than a serious writing on providing insight for real engineers who have better things to do than whine on medium

You could state your disagreement without casting aspersions on the masculinity and competence of the people you disagree with. Given that you yourself are wasting time reading posts on Medium and then whining about them on HN, I have to ask myself whether you are not a real engineer, or whether just maybe real engineers can whine about things sometimes.

Re: JSX is no longer my friend

#140
post #87

So I'm the guy who wrote the post in question. As the view counter started to exceed my expectations I thought there would be a fair amount of negative feedback. I was surprised that there wasn't much. Turns out that it's all here on HN! :P First off, I can't believe all of you actually read that. You have both my sympathy and thanks. Even more thanks for commenting on it. I want to address a few of the points brough…

FWIW my comment also blew up more than I woulda expected. I wasn't really responding to your article even, more to Andre's flavor over the top anti-JSX attitude. It's like you said: each team is different and should use what works for them, and making overblown arguments doesn't help that. If I can double down on the mistake though, I'd be concerned if someone who didn't feel like learning how JSX works tried to dive…

To a certain extent I think Andre's arguments suffer from being 140 chars or less. Seems like he's yelling probably more than he is. And since he brings it up at least once a month I can understand if there is a bit of eyeroll.

Haha, fair enough. Something that I didn't mention but I suppose bears noting, I have, not so secretly, been moving the organization I work for towards elm. hyperscript is much more akin to elm-html than JSX is, and is one of the "comfort level" stepping stones in that effort (along with immutable data structures, combinators, pure functions, etc). While the things I mention in the article were my primary motivators, I'd be lying if I said the above wasn't a factor too.

Thanks!

Post reply on HN