7 ms·
Sort of a meta comment -- the article starts saying that people keep asking "why Clojure". Why such an emphasis on what language stuff is written in? Why does
by qsort 3y ago
Sort of a meta comment -- the article starts saying that people keep asking "why Clojure".
Why such an emphasis on what language stuff is written in? Why does it even matter? Sounds like it was a good engineering choice given the constraints of the problem, get over yourself ffs.
- simongray 3y agoIt's probably because the author keeps getting comments from other developers about his choice of language and he's tired of explaining why. There was a HN submission yesterday about another project of his (also in Clojure) and many of the comments were "Why is this made in Clojure?". Unfortunately, a large segment of developers think there is no value in venturing beyond C-style languages. Another dimension in recent years is the static type checking cult, whose adherents must warn everyone else in the cult whenever they spot any kind of dynamically typed programming language, e.g. causing a separate thread about the lack of static type checking in any comment section about a Clojure project.
- eyelidlessness 3y ago> Another dimension in recent years is the static type checking cult, whose adherents must warn everyone else in the cult whenever they spot any kind of dynamically typed programming language Shun the nonbeliever!
- Scarbutt 3y agoThe blog post does mentioned the lack of a static type system as a drawback. Although it sounds that what he really wants (cause of his prototyping remarks) is gradual typing similar to typescript.
- aphyr 3y agoClojure has a gradual type system--core.typed--that I've used extensively. It's... it's very cool, but for my uses it seems to be more trouble than it's worth. I keep coming back to it every few years, though.
- andai 3y agoI came from C#/Java to JavaScript and it was extremely painful. I didn't care that much about typing until I experienced a dozen types of error that should have been impossible. (Shouldn't even compile, let alone silently poison your data at runtime...) For years I thought it was a dynamic/static issue. Then I used Python (without type hints), and almost all the JS errors were impossible in Python too! Turns out it's about weak/strong typing instead. Put simply: when given something that is an obvious error, throw an error. This sounds obvious, but given an obvious error, in many cases JavaScript remains silent and passes garbage data to the rest of the program. I think if JS added a "use strong", it would remove 80-90% of the need for TypeScript.
- yett 3y agoJavascript does have 'use strict' https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- andai 3y agoYes! Exactly. However: "use strict"; let undef; let str1 = "hello"; let str2 = str1 + undef; console.log(str2); // -> "helloundefined" Whereas I propose: "use sane"; let undef; let str1 = "hello"; let str2 = str1 + undef; // -> Uncaught TypeError: Cannot append string and undefined console.log(str2); // (code never reaches this point) (I would also settle for "Uncaught ReferenceError: Attempted use of `undef` before initialization.")
- cmrdporcupine 3y agoYeah, JavaScript has a pile of terrible type coercions, implicit conversions and misuse/reuse of operators. It was a bad 90s/00s trend to do this kind of thing; re-use + for string append, or coerce things into strings for convenience. Python and Ruby have their own gotchas, though not as bad. You might enjoy this classic comedy routine: https://www.destroyallsoftware.com/talks/wat https://www.destroyallsoftware.com/talks/wat
- 3y ago
- tosh 3y ago> There was a HN submission yesterday about another project of his (also in Clojure) and many of the comments were "Why is this made in Clojure?". https://news.ycombinator.com/item?id=38525968 https://news.ycombinator.com/item?id=38525968
- Uehreka 3y ago> Why such an emphasis on what language stuff is written in? Because people are interested in the way that languages affect your ability to think and solve problems? Because different languages have different tradeoffs and the tradeoffs involved in less used languages are often underexplored? Jeez dog, ease up.
- NateEag 3y ago> Why such an emphasis on what language stuff is written in? Why does it even matter? polyglot programmers are the exception, not the rule, and even for people who have mastered >5 languages, there's still no one who's mastered the top 50, let alone all the languages out there. Language impacts both codebase contributor pool size and codebase reviewer pool size. In large, conservative orgs, the latter can matter a lot - good luck getting an insurance megaco's security review board to approve the cool new tool you found that's written in Eiffel - none of them know it, so none of them can review it intelligently. Language diversity is a good thing, IMO, and there are many different factors impacting what you choose, and that makes your choice more important, not less.
- deleted 3y ago[deleted]
- kaba0 3y agoTaking up a new language that shares some roots with one you are a master at is/should be trivial to any good programmer, and can be done in weeks/a few months tops.
- cmrdporcupine 3y agoLisp-ish languages are maybe an exception to this, though. And not because of the (strange to many) syntax (or lack of it). The culture of how to write programs in Lisp or Schemes is quite different, very much focused on using recursion, macros, code as data, etc. It can be hard to read through a Lisp program if you're not used to it.
- kaba0 3y agoSimilar roots handle that part. Though I don't think it's all that different from FP-languages.
- cmrdporcupine 3y agoSimilar roots Yeah, fair, I re-read that part after I made my comment and you're right. Though it's a bit weird with Clojure with it being a JVM-based language, it's got this hybrid world which is both Lispy and Java-ish.
- p-e-w 3y ago> Why such an emphasis on what language stuff is written in? Because it's by far the most important decision made during the creation of any software project, and to a large extent, it sets the boundaries of what the software will ever be able to do. Experience also teaches that language choice strongly correlates with overall project quality. When I see a CLI project written in JavaScript (Node), I know that it's probably not worth my time to take a closer look. With Rust, Clojure, Haskell, F# etc, the opposite is the case. This is a cultural effect, rather than a technological one, but that doesn't make it any less real.
- kaba0 3y agoWhile the cultural effect might indeed be quite important, I really don't agree that it is by far the most important decision. E.g. from a performance perspective, the design of you program is orders of magnitude more important than the language itself. Also, not every platform is as limiting - you could for example start a clojure project, and extend it in java without any fuss.
- lemper 3y agobecause it's not rust, bro! if it's rust, people will accept it and move along. aphyr should've written it in ada, though.
- sitkack 3y agoErlang
- cpitman 3y agohttps://en.wikipedia.org/wiki/Law_of_triviality https://en.wikipedia.org/wiki/Law_of_triviality
- tasuki 3y agoI don't understand your comment. Of course people ask "why clojure", we're curious! > Why such an emphasis on what language stuff is written in? Why does it even matter? Because different languages (and especially different paradigms) are different. The choice of language affects the project's future prospects, productivity, expressivity, maintainability, developer satisfaction, ease of finding developers, and a million other things.
- contrarian1234 3y agoBc the whole "data-drive development" is fundamentally a pretty different programming paradigm. You can do similar things piece wise or with a library in other languages but the Clojure language and all your dependencies are structured around it in a cohesive way You wouldn't be able to translate Clojure to another language line by line unless you brought in some framework or library
- justin66 3y ago> Why such an emphasis on what language stuff is written in? People are interested in the decisions that informed the engineering of a tool they respect. People are interested in reading the code but aren’t going to learn something as goofy as clojure (sorry) to do it, and this causes them to whinge. Some combination of those two. I’m sure the second one is purely hypothetical since no one ever whinges on the internet.