JSX in detail
blog.klipse.tech
JSX in detail
1–10 of 73 posts
Re: JSX in detail
#2I have been using JSX quite a bit and this is helping me get a better understanding.
Re: JSX in detail
#3Re: JSX in detail
#4Experimenting 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
#5Experimenting 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...).
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
#6Earlier 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.
Re: JSX in detail
#7Experimenting 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...).
https://github.com/babel/babel/blob/master/packages/babel-pl...
Re: JSX in detail
#8Earlier 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...
Re: JSX in detail
#9Earlier 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...
Re: JSX in detail
#10Earlier 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!