Live data from Hacker News

JSX in detail

blog.klipse.tech

1–10 of 73 posts

Re: JSX in detail

#2
Thanks for posting this, it's a good read so far.

I have been using JSX quite a bit and this is helping me get a better understanding.

Re: JSX in detail

#3
Experimenting with JSX has introduced me to two language constructs: the Pragma, and the Macro. I know that these might seem a bit pedestrian to most folks, but they opened up my understanding of programming languages considerably. I am genuinely a bit surprised that the Javascript community hasn't played around more with the possibilities that both can offer.

Re: JSX in detail

#4

Experimenting with JSX has introduced me to two language constructs: the Pragma, and the Macro. I know that these might seem a bit pedestrian to most folks, but they opened up my understanding of programming languages considerably. I am genuinely a bit surprised that the Javascript community hasn't played around more with the possibilities that both can offer.

In LISP based languages like ClojureScript, macros are part of the language. No need to build tools like JSX (that requires to run on webpack + IDE tooling etc...).

Re: JSX in detail

#5
post #4

Experimenting with JSX has introduced me to two language constructs: the Pragma, and the Macro. I know that these might seem a bit pedestrian to most folks, but they opened up my understanding of programming languages considerably. I am genuinely a bit surprised that the Javascript community hasn't played around more with the possibilities that both can offer.

In LISP based languages like ClojureScript, macros are part of the language. No need to build tools like JSX (that requires to run on webpack + IDE tooling etc...).

JSX could be language-integrated (witness the now-deprecated E4X for XML literals in Javascript), it just is not.

And most lisps don't have unfettered reader macros which would allow embedding macros using non-lisp syntax (aka JSX).

A macroed JSX wouldn't make much sense in Lisps really, and AFAIK isn't used with most clojurescript vdoms using either hiccup structures or regular function calls.

Re: JSX in detail

#6
post #5
post #4

Earlier quoted context omitted.

In LISP based languages like ClojureScript, macros are part of the language. No need to build tools like JSX (that requires to run on webpack + IDE tooling etc...).

JSX could be language-integrated (witness the now-deprecated E4X for XML literals in Javascript), it just is not. And most lisps don't have unfettered reader macros which would allow embedding macros using non-lisp syntax (aka JSX). A macroed JSX wouldn't make much sense in Lisps really, and AFAIK isn't used with most clojurescript vdoms using either hiccup structures or regular function calls.

who needs JSX when you have hiccup!

Re: JSX in detail

#7
post #4

Experimenting with JSX has introduced me to two language constructs: the Pragma, and the Macro. I know that these might seem a bit pedestrian to most folks, but they opened up my understanding of programming languages considerably. I am genuinely a bit surprised that the Javascript community hasn't played around more with the possibilities that both can offer.

In LISP based languages like ClojureScript, macros are part of the language. No need to build tools like JSX (that requires to run on webpack + IDE tooling etc...).

I could be wrong, but I don't think a LISP macro can transform the structure of the code in the same way that the JSX pragma turns an XML tree "inside-out". For example here's the source for the Babel JSX transformer:

https://github.com/babel/babel/blob/master/packages/babel-pl...

Re: JSX in detail

#8
post #7
post #4

Earlier quoted context omitted.

In LISP based languages like ClojureScript, macros are part of the language. No need to build tools like JSX (that requires to run on webpack + IDE tooling etc...).

I could be wrong, but I don't think a LISP macro can transform the structure of the code in the same way that the JSX pragma turns an XML tree "inside-out". For example here's the source for the Babel JSX transformer: https://github.com/babel/babel/blob/master/packages/babel-pl...

A lisp macro see a code block as a tree of symbols/primitives. It can do anything. This means that it is easy to write a library with a nice dsl, but hard to read other people's code.

Re: JSX in detail

#9
post #7
post #4

Earlier quoted context omitted.

In LISP based languages like ClojureScript, macros are part of the language. No need to build tools like JSX (that requires to run on webpack + IDE tooling etc...).

I could be wrong, but I don't think a LISP macro can transform the structure of the code in the same way that the JSX pragma turns an XML tree "inside-out". For example here's the source for the Babel JSX transformer: https://github.com/babel/babel/blob/master/packages/babel-pl...

[deleted]

Re: JSX in detail

#10
post #6
post #5

Earlier quoted context omitted.

JSX could be language-integrated (witness the now-deprecated E4X for XML literals in Javascript), it just is not. And most lisps don't have unfettered reader macros which would allow embedding macros using non-lisp syntax (aka JSX). A macroed JSX wouldn't make much sense in Lisps really, and AFAIK isn't used with most clojurescript vdoms using either hiccup structures or regular function calls.

who needs JSX when you have hiccup!

[deleted]
Post reply on HN