Live data from Hacker News

Keep your source code SIMPLE

medium.com

71–77 of 77 posts

Re: Keep your source code SIMPLE

#71

My feeling is these paradigms, SOLID and SIMPLE, boil down to basically: small objects, connected minimally, though interfaces. SIMPLE appears to be leaning even more towards the functional programming side of things; I think we should probably just get it over with and accept that composition of functions operating on immutable data structures is just the right way to go.

> ... composition of functions operating on immutable data structures is just the right way to go Yeah. No. Maybe. The cost of immutability can be high. Immutability can be very elegant when it's right, but mutability can be clearer other times. As another respondent said, there's no silver bullet. There's no 'right way to go'; as ever it depends.

> The cost of immutability can be high

If you analyze expenses for software projects of 1960-80ies and compare them with recent years, you probably see that the most expensive item now is at the bottom. The most costly thing used to be hardware. The not so expensive - developer's time. Now it's the opposite - the equipment is cheap, and the software developer's salary is the most expensive thing. Of course, that does not apply to every single case, but for the majority of projects, that is true.

Immutability by default (baked into the language), offers enormous benefits, and increases programmer's productivity, it simplifies many things, especially concurrency and parallelism. Languages like Erlang and Clojure are good examples. The price you are talking about does matter. But very often, the benefits outweigh the small cost.

Re: Keep your source code SIMPLE

#72

My feeling is these paradigms, SOLID and SIMPLE, boil down to basically: small objects, connected minimally, though interfaces. SIMPLE appears to be leaning even more towards the functional programming side of things; I think we should probably just get it over with and accept that composition of functions operating on immutable data structures is just the right way to go.

Please note that the article merely encourages the application of some of the best practices introduced by functional programming - strong typing and more mindfulness around mutability and side effects - into all forms of programming. Functional programming as it exists today takes these ideas to a somewhat extreme form. That has its place and value, but as experience in the real world shows, as long as it feels so m…

> as long as it feels so mathematical, it isn't everybody's cup of tea.

Languages like Elm, Elixir and Clojure don't feel "so mathematical".

Re: Keep your source code SIMPLE

#73

Earlier quoted context omitted.

I feel like this comment is throwing semantics in a blender and pouring it out into the shape you want... but I guess that's the thing about arguing semantics, it usually devolves to that... So I guess I'll just keep my recommendation to Kotlin and you can keep your recommendation to Clojure

> I feel like this comment is throwing semantics in a blender and pouring it out into the shape you want I don't think it is, though. But it is clear that you are arguing with absolute confidence about a thing you have never given a heartfelt attempt to try first. You are debating like a medieval 13th-century mathematician that Roman numerals are elegant and more comfortable to understand, and people been using them…

Hahaha

Thank you for the laugh, I imagined you typing that last paragraph, reading it, and thinking you had said something pithy and being proud to share that hackneyed screed with the world.

Up until this point I haven't even shared my opinions of Clojure (which I've used) in absolute terms, did you realize this is all in relation to OP's description of "dorky languages", so I was speaking to OP's PoV as someone who probably doesn't use non C-like languages, not myself. Erlang, my pet language is plenty dorky, you seem to have confused "dorky" with "bad" or lacking utility.

But alas, let me just be straight forward, Clojure is bad.

A masturbatory aid for bored developers burning perfectly good time and money for their own overinflated sense of accomplishment and their quirky resumes.

Imagine being a language that literally lists it's half it's rationale as "our customers who won't let us run what we want, so we stuck what we actually wanted to make, on this JVM thing that they all know real well".

Clojure code bases devolve into contrived spaghetti so blindingly fast, but by god will the people writing it get off to how dense the code they're writing is while the decent into madness marches on, and boy will they enjoy how they're really sticking it to those stupid Java guys with no types... while 90% the code they interop with was clearly designed to be used in a typed setting.

And you can count down on a M-F calendar view how many days before the codebase will feature a different DSL for each programmer who's touched it which allows them to define complex business rules as a new sub-language instead of icky "normal" shudder code. Java did only a few things right, and no macros was one, imagine thinking undoing that is the right choice.

Clojure devs love to hold up the few high-profile successes and a bunch of no name success stories that are small enough to probably have served just as well by anything from Clojure to writing out Java bytecode in pico.

The funny thing is the most common successful cases actually went and tacked on a freaking type system! https://typedclojure.org/

Have they heard of F#? And if they're so allergic to types, good god why are you on the JVM and trying to interop with JVM code. If you're not trying to interop with JVM code, why Clojure? Why not Elixir or Erlang, which kick Clojure's ass at the other half of the rationale it always gets, concurrency and immutability.

Actually, don't answer that, we already know. Because JVM contains Java, and Java = business, and you're not going to get to jerk off at work with an unproductive language if it doesn't have something a business type can latch onto! You don't want to admit "we want to use this language with a much smaller hiring pool, much less mindshare, unnecessary barriers to interop with one of the largest ecosystems in tech, which is very prone to creating unmaintainable nightmares in the long term by it's very nature."! You want to express it as "we want to use Java but with parenthesis can we huh can we pls pls k thnx".

Clojure is a garbage language that always gets defended with "you just don't get it". What a joke.

Re: Keep your source code SIMPLE

#74

Earlier quoted context omitted.

Imo no Lisp variant can claim to not be in the "dorkier" side of things ("dorkier" being read as "hard to approach" in my eyes). I'd say Kotlin over Clojure.

That is very, very far from the truth. You obviously haven't probably tried Clojure. I think, among all the languages being actively used in the industry (in business, not academy), Clojure perhaps can be crowned as the simplest of them all. The ingenious of Rich Hickey was to design it the way that the essentials were made simple and complicated stuff either unnecessary or pushed onto the edges of the ecosystem. Clo…

Ha, I've used Clojure, see my thoughts above in the other thread.

By the way, I love Java, love Kotlin even more. Don't bring the JVM and other languages down to Clojure's level just because Clojure is clutching onto the JVM's coattails.

Re: Keep your source code SIMPLE

#75

Earlier quoted context omitted.

That is very, very far from the truth. You obviously haven't probably tried Clojure. I think, among all the languages being actively used in the industry (in business, not academy), Clojure perhaps can be crowned as the simplest of them all. The ingenious of Rich Hickey was to design it the way that the essentials were made simple and complicated stuff either unnecessary or pushed onto the edges of the ecosystem. Clo…

Ha, I've used Clojure, see my thoughts above in the other thread. By the way, I love Java, love Kotlin even more. Don't bring the JVM and other languages down to Clojure's level just because Clojure is clutching onto the JVM's coattails.

I couldn't answer in the other thread because your reply got downvoted (and rightfully so) and went "dead." I get it. You personally hate Clojure. The reasons though objectively, are your own personal and nothing to do with the design of the language.

You felt that Clojure doesn't bring any value. Well, there are thousands of people who think differently, not just me. I have grown to distrust fanboys, and even more so, haters. If you hate a programming language that consistently being ranked among others at the top of "the most loved" category, there's something wrong with your assumptions about that language.

Please don't waste your energy trying to write another lengthy comment. Your argumentation is flawed, but I won't spend my time trying to prove you wrong because you wouldn't see the truth even if it hit you right between your eyes.

Clojure notoriously known for attracting older, experienced, "grumpy" developers. Programmers with years of experience and seasoned in many other languages, because it simplifies many things. "Out of the Tar Pit" - as the phrase and as the widely known paper, accurately characterizes principles that Clojure has built on. And If your only take on the language (I quote your own words), is: "Clojure is a garbage language," then I guess I misjudged your programming experience level. Maybe you haven't struggled enough with other PLs to the point that it gets so tiresome you start thinking about retirement.

Re: Keep your source code SIMPLE

#76

Earlier quoted context omitted.

Ha, I've used Clojure, see my thoughts above in the other thread. By the way, I love Java, love Kotlin even more. Don't bring the JVM and other languages down to Clojure's level just because Clojure is clutching onto the JVM's coattails.

I couldn't answer in the other thread because your reply got downvoted (and rightfully so) and went "dead." I get it. You personally hate Clojure. The reasons though objectively, are your own personal and nothing to do with the design of the language. You felt that Clojure doesn't bring any value. Well, there are thousands of people who think differently, not just me. I have grown to distrust fanboys, and even more s…

Please, how long of a response is there to a comment that boils down to:

"I have no concrete rebuttal so I'm going to refute your objective points about it's shortcomings with nonsense about retirement age programmers and whining you weren't nice while systematically listing all the things wrong with it and all the alternatives beat it at it's own game"

Java and Kotlin and Erlang (again, literally my "pet favorite language" since, predictably you're going "lalalalala you just dont get simple languages lalalalal") are all languages known to be used by programmers to make useful stuff, at a success rate much much higher than Clojure.

Re: Keep your source code SIMPLE

#77

Earlier quoted context omitted.

> ... composition of functions operating on immutable data structures is just the right way to go Yeah. No. Maybe. The cost of immutability can be high. Immutability can be very elegant when it's right, but mutability can be clearer other times. As another respondent said, there's no silver bullet. There's no 'right way to go'; as ever it depends.

> The cost of immutability can be high If you analyze expenses for software projects of 1960-80ies and compare them with recent years, you probably see that the most expensive item now is at the bottom. The most costly thing used to be hardware. The not so expensive - developer's time. Now it's the opposite - the equipment is cheap, and the software developer's salary is the most expensive thing. Of course, that does…

Nice reply, thanks. I fully understand the benefits and we agree then, except possibly for the issue of the cost.

I haven't checked the value of eg. for{} in scala vs a mutable/procedural loop, but I wouldn't be surprised if it was an order of magnitude or two different. Figures are needed, and I don't have them (nor the time to benchmark them now, simple though it is).

Post reply on HN