4 ms·
I would go as far as to say that a language with more traditional syntax (for instance Python style) with pervasive immutable data structures would do very well
by reitzensteinm 8y ago
I would go as far as to say that a language with more traditional syntax (for instance Python style) with pervasive immutable data structures would do very well. Few of the benefits Clojure brings to day to day development seem to require a lisp syntax.
- dustingetz 8y agoMaybe – s-expressions have a killer app though, which is that they are so simple that the level of effort to port Clojure to other platforms (ClojureScript, Clojure CLR, etc) is within reach of one person. I am irrationally bullish on Clojure, but this is the key to the bet – platform reach has network effects which I believe may outweigh in longrun the resistance to alien syntax. My Clojure codebase (http://www.hyperfiddle.net/ http://www.hyperfiddle.net/) runs on JVM, node, browsers, lambdas, and inside Datomic cluster as stored procedure. Same code! Same library artifact! Simultaneously targeting all these different platforms!
- reitzensteinm 8y agoAll platforms could share the same syntax->s expression desugaring code, so I'm not sure why that would matter. The difference Clojure has is that the core language is tiny, but you could do this with an alternative syntax as well. You'd just need macro support, even if they're more clumsy to write. (I literally have an editor open working on a Clojure compiler as I write this, so I don't disagree with your premise).
- drcode 8y agoI'm definitely as hardcore of a clojurist as you can be, but I would NOT call myself "bullish" on clojure: Certainly, for those of us familiar with the language it's an awesome tool, but clojure definitely is not the "hot new thing" anymore and new user adoption I think is declining in recent years, for reasons that have little to do with intrinsic properties of clojure.
- dustingetz 8y agoi track clojure growth metrics, it is definitely not declining, and the killer apps have yet to reach market. Python was dominating Ruby at the 10 year mark, and then Rails happened. the metric i cherrypick to try to measure disruption is how many edge innovators an ecosystem attracts, and Clojure aces this. React.js is one of few great innovations that came out of Javascript, and even virtual dom I saw first in ClojureScript at your talk Webfui at Conj 2013!
- dustingetz 8y agooops, Webfui was 2012, React.js was 2013
- int_19h 8y ago> which is that they are so simple that the level of effort to port Clojure to other platforms (ClojureScript, Clojure CLR, etc) I don't see why that would be at all relevant to porting to other platforms? Most languages with richer syntax would parse to a backend-independent AST first, and so porting to a new platform would not require touching the parsing code at all - you'd be working on the same level as S-exprs, effectively.
- dustingetz 8y agothe s-expressions make the compiler simple. Clojure the language was designed to make portability simple. you need both
- int_19h 8y agoA well-designed grammar isn't difficult to parse into S-expressions. And they were writing compilers for languages with rich grammars (e.g. Algol-60) back in 1960s - often in hand-written assembly, on punch cards! I think a claim that it makes the implementation overly complex strains credulity.
- macintux 8y agoElixir?
- int_19h 8y agoBetter yet, a new syntax for this language, like Reason is to OCaml. (or the original M-expressions for Lisp)
- fiddlerwoaroof 8y agoMy experience starting to work with lisps was similar: I thought "this is a great language, if only it had a nicer syntax" and I played with things like https://readable.sourceforge.io https://readable.sourceforge.io to try to make writing lisp more like writing my favorite language at the time (Python). After a while (and especially once I learned how to use paredit effectively), something changed and I realized that the s-expression syntax was exactly the syntax that I wanted.
- int_19h 8y agoNevertheless, there's a strong argument to be made that unwieldy syntax is at least part of why Lisp-like languages aren't as popular as competitors, with syntax being the only seemingly consistent difference. And it seems particularly relevant to Clojure, given that it's otherwise very un-Lispy in many respects (e.g. cons cells are not the end-all be-all), and closer to other modern languages.