Live data from Hacker News

My thoughts after using Clojure for about a month

acdw.net

51–60 of 204 posts

Re: My thoughts after using Clojure for about a month

#51
post #4

> I do wish there were an easier way to move in the ]}]})))}-ness of block ends though. I’m not quite sure what this means. How is it different/worse than all parens..? fyi I use paredit and just hit ) and it moves me past any kind of paren/bracket. But even without that you can just hit left and right..?

Exactly. Paredit for the win.

Re: My thoughts after using Clojure for about a month

#52

Earlier quoted context omitted.

The programming language informs the design of the system. As I said in my earlier comment, an idiomatic Java codebase is going to be designed very differently to an idiomatic Clojure codebase, even if they both intend to solve the same problem.

But that's still not a function of the syntax per se; Java has no immutability encoded in its runtime, hence it does not offer it as a syntax either.

Scala has no immutability encoded in its runtime either (as it's the same as Java), but yet syntactically it's immutable in practice. Will the JRE technically allow a val to be edited through some third party thread inspecting your code and messing with memory? Sure. But it's not a reasonable fear in any real world environment, where I cannot remember, in 15+ years of professional scala, a case where anything I expected to be immutable (everything) to be mutated under me. Nowadays people using in in an FP style don't even think of the physical threads, as green thread libraries are taking care of all the scheduling.

So focusing on the runtime's guarantees doesn't seem like a practicality focused argument to me.

Re: My thoughts after using Clojure for about a month

#53
post #2

The functional paradigm is a bit uncomfortable at first, but it does make problem solving feel... different. I personally find OOP to be the most intuitive for large scale systems design, but that's just me. Most models do not perform particularly well in Clojure, but OpenAI models fully utilize the power of the language. Subjectively, it kind of seems to match the personality. Data at https://gertlabs.com/rankings?p…

> I personally find OOP to be the most intuitive for large scale systems design, but that's just me.

At one point, I was the same. But after going functional in Clojure, I can’t imagine going back. Using maps nd just having common functions that transform data into different data is definitely the way to go. This is with your time: https://youtu.be/aSEQfqNYNAc

Re: My thoughts after using Clojure for about a month

#55
post #52

Earlier quoted context omitted.

But that's still not a function of the syntax per se; Java has no immutability encoded in its runtime, hence it does not offer it as a syntax either.

Scala has no immutability encoded in its runtime either (as it's the same as Java), but yet syntactically it's immutable in practice. Will the JRE technically allow a val to be edited through some third party thread inspecting your code and messing with memory? Sure. But it's not a reasonable fear in any real world environment, where I cannot remember, in 15+ years of professional scala, a case where anything I expec…

You are citing a commendable exception (Scala) to tear down a bigger argument which is not exactly a fair discussion.

Furthermore, if you trace my comments, you'll see that I had to choose PLs years ago (12+ to be precise). Things were quite different at the time. Java might have almost caught up today; back then we couldn't even be certain `synchronized` is stable all the time. Just saying.

Scala did very well then, judging by your words. I could probably offer a loose analogy to Typescript as well; while it does compile to JS underneath, they added a stricter layer that makes programming in it more deterministic and stable. (Not the same thing because my main point was "runtime" but hey, show me a perfect analogy.)

You are free to say your last sentence. I am free to disagree. My practice has shown me that runtimes bleed into syntax almost always. Exceptions exist, sure.

Re: My thoughts after using Clojure for about a month

#56
post #2

The functional paradigm is a bit uncomfortable at first, but it does make problem solving feel... different. I personally find OOP to be the most intuitive for large scale systems design, but that's just me. Most models do not perform particularly well in Clojure, but OpenAI models fully utilize the power of the language. Subjectively, it kind of seems to match the personality. Data at https://gertlabs.com/rankings?p…

Functional is far more comfortable to me. Trying to model all that state spread through out your program with no way to really isolate it or just reason about a small part of the program at a time, I find very stressful.

Re: My thoughts after using Clojure for about a month

#57

Thats nice but not many jobs for it

If that’s your concern you don’t need to be concerned with any technical quality of any language. Just count job postings by language and learn the one with the highest value.

if there isn't any jobs for it it probably doesn't have the appeal or communicate economic value

Re: My thoughts after using Clojure for about a month

#58

Earlier quoted context omitted.

The programming language informs the design of the system. As I said in my earlier comment, an idiomatic Java codebase is going to be designed very differently to an idiomatic Clojure codebase, even if they both intend to solve the same problem.

But that's still not a function of the syntax per se; Java has no immutability encoded in its runtime, hence it does not offer it as a syntax either.

But syntax must necessarily include what it's representing, no? For instance, `{:a 1}` represents an immutable map in Clojure, in the same way that `42` represents an immutable integer in Java.

Re: My thoughts after using Clojure for about a month

#60

Earlier quoted context omitted.

But that's still not a function of the syntax per se; Java has no immutability encoded in its runtime, hence it does not offer it as a syntax either.

But syntax must necessarily include what it's representing, no? For instance, `{:a 1}` represents an immutable map in Clojure, in the same way that `42` represents an immutable integer in Java.

Agreed, though I didn't mean "constants" when I said "immutability".
Post reply on HN