top | item 25380596

(no title)

sankyo | 5 years ago

Everything is a function, functions are first class.

REPL based development gives you instant feedback. lets you write a function in your editor and then run it, change it, run it again. If your idea of REPL is python or ruby, then you are not getting the entire picture. https://stackoverflow.com/questions/5671214/is-lisp-the-only...

Immutable by default. This helps with debugging and solves thread safety. Feel free to pass around references without worry.

Java interop - you can use all the jars

"isomorphic" - write clojurescript for the browser, Clojure for the server

discuss

order

rtpg|5 years ago

I think the libraries/standard collections having the functions they have is a _huge deal_.

Some other example, Python and JS are both similar languages in many respects. But even something as simple as not having list comprehensions makes JS more fidgety when you're writing simple code.

Python not having great utils for stuff like "give me this dictionary, but without these three keys, but keep the original dictionary intact" (Clojure has dissoc for this) also makes it a bit fidgety compared to Clojure.

"You can write all of this" maybe, but at one point you're really going upstream from the base language.

techdragon|5 years ago

What do you mean python doesn’t have good tools to select what you need from a dictionary and keep the original intact, you just use a dictionary comprehension and boom you’re done...

  new_dictionary = {__k: __v for __k, __v in original_dictionary.items() if __k not in {‘key1’, ‘key2’, ‘key3’}}
(written on my phone without a repl to double check but the technique is sound and i use it all the time)