Earlier quoted context omitted.
"The worst injuries I've ever seen were in big factories with large, powerful tools -- not in home garages where people just use hammers and hand-saws." Powerful abstractions are... powerful. They're more difficult to use correctly, and take longer to learn. The conclusion shouldn't (always) be to avoid them entirely.
A good rule of thumb is the more powerful the language the stronger your justification needs to be for using it: https://en.m.wikipedia.org/wiki/Rule_of_least_power LISP is, of course, way more powerful than most languages so it is more susceptible to technical debt.
Why I Switched from Python to Clojure (2016)
81–90 of 200 posts
Re: Why I Switched from Python to Clojure (2016)
#82I have considered multiple times switching from Python to other alternatives. However, I instantly discard any language with a Lisp-like syntax. I just cannot work with it. Being a Haskell hobbyist, I would like Python to be statically type and have better support for pure functional programming, but Python has the libraries that I need.
"I instantly discard any language with a Lisp-like syntax. I just cannot work with it." I feel the opposite. I avoid any language without a Lisp-like syntax, since its absence is a serious handicap which unnecessarily complicates code and makes it less readable. I also much prefer the Lisp idiom of using meaningful function and variable names, vs the one-letter names and crypitic operators that are so common in Haske…
Macros, while easy to abuse, are kind of a game-changer; the ability to add new semantics to a language make it borderline impossible for me to go to any language that doesn't have a good macro system.
I started with Clojure, which I still really enjoy, but due to how much I grew to love the `define-syntax` system in Chicken Scheme, that's become my latest weapon of choice.
Re: Why I Switched from Python to Clojure (2016)
#83Earlier quoted context omitted.
The parent post did not say JVM, they said Java paradigms. Vastly different things. Writing Javaonic Clojure vs Clojuronic Clojure. So, trying to replicate the style/structure/paradigms of Java rather than learning and using the Clojure styles, structures and paradigms.
Yes, I understand, and I contend that being able to do this, and leverage Java libraries bidirectionally in impure Java-y ways is an explicit, deliberate and fundamentally useful feature of Clojure. Unless you're trying to say that things like protocols are fundamentally un-Clojurey because they smell of OO or something in which case I just disagree.
Re: Why I Switched from Python to Clojure (2016)
#84Earlier quoted context omitted.
I have considered Python many times, but I cannot work with a language that considers whitespaces as required syntax. I just cannot work with it.
Whitespace is not any more significant in Python than most languages. Indentation is significant. Just replace '(' with space/tab and ')' with "deindent". Done.
I prefer to let this idea of required indentation to FORTRAN.
Re: Why I Switched from Python to Clojure (2016)
#85I can, and do, appreciate opinions on languages themselves. But my decision to continue using Python over Clojure is much less about the language's syntax and more about the available libraries. How do Clojure web frameworks compare to Django/Flask? What would I use instead of Pandas for data analysis? Are there keras-like deep learning tools? Switching languages based on a comparison of idiosyncrasies between the tw…
Re: Why I Switched from Python to Clojure (2016)
#86Earlier quoted context omitted.
Oh, so many things. The parallelism isn't actually that powerful, and in 2019 there's very little to set it apart. The building blocks are great, e.g. immutability everywhere, but few of the built-in primitives are actually usable (hidden unconfigurable thread pools etc). Stack traces still regularly horrible. Libraries are regularly abandoned. ClojureScript integrating with npm etc is more stress than you'd like. Co…
I had lots of pain dealing with CLJS but, since switching to http://shadow-cljs.org as my compiler, I've generally found that things "just work": instead of complicated messing with externs, you just npm install the package and then add `["vega" :as vega]` to your namespace's list of requires. As far as the stack traces go, I have a hard time understanding why tooling like Cider's stacktrace filtering isn't wider spr…
In terms of stack traces, it's not just the location in your code that you care about, it's the nature of the error. In lieu of spec being ubiquitous or anybody really checking their arguments ever, you're still left looking at 20 lines of stack beyond your own code to realise you've passed the incorrect type or structure somewhere. And even with spec you need additional libraries to actually yield human error messages in a lot of cases.
Re: Why I Switched from Python to Clojure (2016)
#87I can, and do, appreciate opinions on languages themselves. But my decision to continue using Python over Clojure is much less about the language's syntax and more about the available libraries. How do Clojure web frameworks compare to Django/Flask? What would I use instead of Pandas for data analysis? Are there keras-like deep learning tools? Switching languages based on a comparison of idiosyncrasies between the tw…
I will admit that there aren't as many direct Clojure libraries, but many of the core things out there; core.matrix works pretty well for elaborate matrix processing, there are several decent web frameworks, as well as parsing libraries. There's a metric ton of libraries for Java and Scala out there, and as a consequence of Clojure's ability to use Java stuff, you have access to all of it. I admit I've not done a ton…
Re: Why I Switched from Python to Clojure (2016)
#88I can, and do, appreciate opinions on languages themselves. But my decision to continue using Python over Clojure is much less about the language's syntax and more about the available libraries. How do Clojure web frameworks compare to Django/Flask? What would I use instead of Pandas for data analysis? Are there keras-like deep learning tools? Switching languages based on a comparison of idiosyncrasies between the tw…
Clojure lets you leverage the entire Java library ecosystem, which is flippin' huge -- bigger, even, than Python's.
Re: Why I Switched from Python to Clojure (2016)
#89Re: Why I Switched from Python to Clojure (2016)
#90Earlier quoted context omitted.
It's not a "forest of parens" any more than any language with C style syntax is, they're just in different places (the correct places) and there's no need to distinguish with braces (which you shouldn't need to).
That’s not true. When you’re passing functions to functions inside functions that return functions... it’s a nested mess. I studied Lisp and Scheme at university and that’s where it had to remain for me: academically entertaining mind puzzles in data structures and algorithms. It’s just not productive or easily graspable from one coder to another.
The following does exactly what you'd expect, and there are even cooler ones like `some->` or `as->`.
(->> some-nums
(map square-root)
(filter even?)
set
count)
This is what lisp buys you, dead simple rules for syntax, with the option to add syntax with macros. If you made a mistake in syntax design, deprecate the lib and make a new macro, it need not be a feature of core language for all eternity.