4 ms·
I guess you have had some experience that explains this sentiment of yours, even though I can't guess at what it is. To me, CoffeeScript is pretty much to Pyth
by yesbabyyes 16y ago
I guess you have had some experience that explains this sentiment of yours, even though I can't guess at what it is.
To me, CoffeeScript is pretty much to Python as Clojure is to Common Lisp, as far as syntax is concerned. It's similar enough for syntax not tripping anybody up.
One of the problems with JavaScript's C-like syntax, IMO, is that it makes people think in a C-like way. CoffeeScript's syntax brings out the functional qualities of JavaScript in a nice way. Writing CoffeeScript makes me a better JavaScript programmer.
Further, if you're working on a Node stack there are a few levels where CoffeeScript and JavaScript can interact. Different modules can be written in either language. You can expose a http.Server interface in your application. If you're on Connect/Express, you can mount routes to apps written in either language, or even Zappa.
And if you want a moratorium on new syntax, I suggest you stop learning new syntax. I look forward to a future where syntax moves further into the background.
- edw 16y agoMy experience stems from learning the language of the week for twenty years until getting serious about learning lisp, and coming to see that syntactic innovation at the language parser level is a waste of time. Syntactic innovation should occur through a macro facility that gives everyone, not just the parser-writing language gods, tools to build a language that suits their needs. That is why CoffeeScript is ultimately uninteresting if perhaps useful to people who don't understand or are not in a position to use lisp. In my experience, JavaScript's syntax has never encouraged people to think in a C-like way. In a Java-like way, perhaps, but not really even then. People seem to get, if they're remotely clueful, that JavaScript programming calls for a lispy approach. It's all the damn parens and (optional) semicolons and braces and no-win indenting scenarios that frustrate people who try to exploit JavaScript to its fullest. Yes, CoffeeScript solves these problems and others, but through the introduction, as I said before, of yet a new set of rules that result in whitespace-sensitive line noise code that requires frequent contact to stay familiar with. And again, I'm a busy person: a new language wastes my time because I already need to write shell scripts, Clojure, and Python in a daily basis. I know JavaScript, even if I dislike it. And if you're going to learn a language that doesn't help your resume with The Man, you may as well learn a language that can change your life. Like a lisp.
- cageface 16y agoLisp's flexibility is more of a theoretical advantage. In practice, particularly in common programming contexts, I think it's more valuable to have a richer, standardized syntax. Sometimes its better to nail down a few degrees of freedom in order to better exploit others.
- edw 16y agoI agree and disagree with you. Vehemently. Most programming tasks will not require writing macros because most programming tasks amount to solving understood problems. But those programming tasks will be accomplished and made tractable and tolerable through the use of macros that someone else wrote. Think of the analog of writing a desktop application: there are many object-oriented desktop app frameworks where you can write pretty rich apps exclusively by instantiating existing classes, and this is possible because some domain experts designed a framework for writing desktop apps. Macros—which I've been using as a shorthand for "syntactic innovation"—are the same way. Someone writes e.g. a web application framework that consists of some macros, perhaps of deep skankiness, that let you write clean, obvious code that solves whatever problem in the web application domain that you're currently confronted with.
- cageface 16y agoI've heard this argument made many times, but where's the evidence? If true, we should see Lisp used disproportionately at the cutting edge of software design. Lisp is somewhat more common in these contexts, but no more so certainly than languages without macros like Erlang & Haskell.
- edw 16y agoI will grant you that people are doing interesting things in languages other than lisp, and in that in many of those situations, when the results are interesting, you see lispers smugly replicating those systems and saying, "That was easy; we could've done that." But they didn't. That said, I think the various lisps out there have plenty of user—and by that I mean programmer—success stories. My favorite right now is Cascalog. It's an amazing, life changing tool for anyone who needs to analyze data sets using Hadoop. It makes something that would otherwise be too difficult (given the time I have) to even try to do into something that is fun. Nathan Marz, Cascalog's author, should be considered for a MacArthur genius grant. Cascalog, incidentally, would not be nearly so amazing if not for the relatively few macros that tie everything together.