Jeremy Ashkenas: “work towards building a language that is to ES6 as CoffeeScript is to ES5”… close, but—do it for [ES6+HTML+CSS], and you’ll win ;)
It occurs to me that there is a shortcut available. Let a library like React replace [ES6+HTML+CSS]. Then build a DSL for that library.
In the process, I start by replacing JSX with a library which was inspired by Builder, Markaby, and Tagz. These libraries, in turn were presumably inspired by earlier works like Perl’s CGI.
But there is more. JSX can’t directly express iteration. Look at CommentList from the React tutorial. Instead you build up a list, and then subsequently wrap that list. For nested lists, it appears worthwhile to split out separate components. There is nothing wrong with doing that, but I will suggest that the primary reason to split out a component shouldn’t be to pander to the limitations of the programming language syntax.
In Ruby you can directly express iteration. So where a comment box in the tutorial takes four classes, an entire calendar month can be expressed in one.
The net is that I can write smaller, more understandable code. And in the process focus more on the problem I’m trying to solve.
Now I don’t expect to have the success or impact that CoffeeScript has had. But I can say that I’m having fun. And in the process, I’m seeing the benefits with applications I write.