String-first programming languages seem to be a really interesting and underexplored design space. I want something halfway between JSX and Scribble, but not MDX.
-
Show this thread
-
Requirements: * No quotes or escapes -- strings are the default, not the exception. * Allow transition between string and code dialects with as few characters as possible, and with arbitrary nesting. * Should be easy to define non-string data structures: lists, classes, lambdas
1 reply 0 retweets 4 likesShow this thread -
Scribble is by far the best example of this design, but I've found it hard to directly translate its concepts into JS / React. Eg sometimes you want to generate a string (say to pass to KaTeX or Penrose), sometimes you want to generate a React element.
2 replies 0 retweets 2 likesShow this thread -
Also "underexplored" isn't quite right. The web is rife with templating languages, which are string-first PLs. But they all suck, except for JSX.
2 replies 0 retweets 5 likesShow this thread -
Replying to @wcrichton
I got out of web stuff right before JSX became popular: what makes it not suck? I remember using Handlebars and ERB at work and wishing there was something better.
1 reply 0 retweets 0 likes
<ol>{http://elems.map (x => <li>{x}</li>)}</ol> Can't do that (.map) in a templating lang, bc the programming model is never a general purpose PL. By contrast, JSX has the full power of JS.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
cognitive psychology. PhD