Hacker News new | ask | show | jobs
by jecxjo 2476 days ago
Can I ask why?

I came from low level language background but my "fun programming" went from Lisps to MLs and now I have difficulties going back to Lisps for projects. Always wanted to like Clojure but never had a need for JVM in anything I worked on.

3 comments

My little brain can't keep up with too many things (in short term memory) at once, so more concise and expressive languages are better for me. Also, more sane languages are better (where it's harder to shoot yourself in the foot because you're not (yet) very good at the language).

The homoiconicity of Lisps allow me to think less about syntax. (function <args...>). And reading code is easier, since I see the operations first. Adding more advanced features (via macros) can give you lovely function chaining - threading, piping, etc.

Immutability in Clojure is also good for me because it allows me to learn and forget about functions. Black boxes are great things when you can trust that they are pure functions; just compose bigger black boxes and so on.

I don't do a lot of Clojure these days, but when I was using it professionally I could basically forget about JVM; JDBC was about the only time I interop-ed with Java. If you need some of the good things that JVM offers, great; if not, it's just a hosting environment. Same with Elixir and BEAM (although JVM and BEAM are very different and tailored for different problem sets).

But on topic, given a choice between ReasonML and JavaScript, it seems to me that ReasonML is more thought out, cleaner, safer, and a step in the right direction.

My little brain can't keep up with too many things either, which is why I only use statically typed languages.

Dynamically typed languages force me to keep type information in my head, and that's just not a good use of my brain when the compiler can be so much better than me at this.

I don't want to take a side in the dynamic vs static typing debate, specially since my favourite languages are Common Lisp and OCaml and it would be difficult for me to choose either, but I wouldn't say your argument of having to keep everything on the head holds if we consider the whole array of dynamic language offerings.

Compared to toys like Perl, Ruby, Python, etc., proper dynamic languages (Lisp, Smalltalk) have state of the art debuggers, browsing and discoverability tools and let you backtrack, experiment and tweak your program in an iterative fashion. They are indeed "little brain" friendly and the development experience matches or surpasses those of compilers and classical IDEs.

I am so much more productive in LispWorks than, say, IntelliJ+Java it isn't even funny.

- Because of a perfect balance between simplicity, elegance, and pragmatism.

- Because of "true" REPL. Having to be able to evaluate any expression without any ceremony, right from your IDE, with one or a couple of keystrokes is remarkably liberating. No language I have tried gives me that enormous boost when prototyping things. Even refactoring existing code is much faster, because of the tightened feedback loop. Only Smalltalk comes close enough, sadly, Smalltalk has been dormant in years, and I don't think it ever comes back as a pragmatic choice to build a business upon. Whenever anyone retorts "Python has REPL, Ruby too, etc." - it is just sad to see their ignorance. One has to give a heartfelt try to understand what makes Lisp REPL so unique.

- Because it is currently probably the best PL for building web-apps. You get real code-reuse, which even in NodeJS with JS/TS turned out to be an unfulfilled promise. You cannot merely share say data validation logic between back-end and front-end, even in NodeJS, let aside other languages. In Clojure, this turned out to be possible, even though you essentially might be running things on two completely different platforms - JVM and the browser.

- Because you have access to tons of libraries. Java and Javascript interop from Clojure and Clojurescript is lovely. Why re-invent the wheel if someone has already done it?

- Because of the fantastic community of genuinely inspiring, smart, and extremely friendly people. When you work with Clojure/Clojurescript, you always feel a step ahead of the crowd [working in other, more popular PLs]. So many things in different languages got inspiration from Clojure: destructuring, immutability, state management (redux, Elm), React hooks, etc. etc. And at the same time, Clojurists never feel shy and actively "borrow" good things from other languages, libraries, and tools. Clojure community of active members has probably fewer people than work for Google, but they generate and enhance so many awesome and cool ideas.

ClojureScript has also been production-quality with lots of users for many years, so it feels safe to use for production projects.