5 ms·
Clojure can compile to Javascript and .NET, so that's 3 major platforms, being among the most portable languages available. That it doesn't compile to Go, that
by bad_user 10y ago
Clojure can compile to Javascript and .NET, so that's 3 major platforms, being among the most portable languages available.
That it doesn't compile to Go, that's because Go isn't a good compilation target. Besides being a subpar language that ignored the last 30 years of research at least, it wasn't designed to be a platform for other languages. If you're looking for disappointments, you aren't looking in the right direction ;-)
- amelius 10y ago> Besides being a subpar language that ignored the last 30 years of research at least That is not really fair. As an example, Clojure itself is dynamically typed, which means it ignores a large chunk of research itself.
- pron 10y ago> Clojure itself is dynamically typed, which means it ignores a large chunk of research itself. It does not. PL research is about how to construct type systems if you choose to construct them. There's plenty of research in untyped languages, too (for a recent, pretty exciting example, see Dedalus, which is the language semantics at the core of Eve).
- StevePerkins 10y agoIn other words: (1) "I love functional programming! Therefore, newer languages that aren't following in the mold of Haskell are conceptually antiquated." ... yet... (2) "I don't care about static typing. Therefore, it's cool to ignore the trend of most major languages moving in that direction over the past decade." Then of course the Rust and Swift guys would tell you that Clojure is an anachronism for relying on garbage collection. Etc, etc... All of these trade-offs, at the level on which they're commonly discussed on HN and other forums, are matters of subjective preference. And that's okay. Disrespecting other communities for their subjective preferences, while trying to give it the objective veneer of "You've ignored the latest 'advances'!", is just pretentiousness.
- pron 10y agoI absolutely agree with the silliness behind "you've ignored the latest advances!" and I also know that the latest advances in research very often yield no advances in practice. I also agree that mocking other languages is usually a sign for having little experience with many project and team types, and with not being able to see the bigger picture. But that doesn't mean that you can't discuss the tradeoffs, or that they're just subjective preferences. Someone who really understands Rust would never say that GCs are an anachronism, as they would be very much aware of the cost Rust pays for the ability to maintain safety when a GC can't be used. But that's not a subjective preference, either. A language like Rust knowingly sacrifices convenience and development speed to be able to target certain kinds of applications.
- steveklabnik 10y ago> of course the Rust and Swift guys would tell you that Clojure is an anachronism for relying on garbage collection. I assure you, we would very much not. (The Rust team, anyway. I haven't seen that kind of nonsense out of the Swift team either, and it'd make even less sense, as Swift is technically garbage collected.)
- IshKebab 10y ago> ignored the last 30 years of research at least Please. They didn't ignore the research they just decided against it. You might say that they were paying more attention to the last 30 years of experience.
- Ar-Curunir 10y agoThey still made the null mistake. Their experience clearly wasn't enough.
- talideon 10y agoThe right solution would've been to go for algebraic data types or at least nullable types. The justification for not going down the former route was that they overlapped too much with interfaces, which is a justification I'm not exactly convinced by. Algebraic data types would make error handling in Go a heck of a lot more pleasant to boot.
- Ar-Curunir 10y agoYes, but that would involve looking at the last 30 years of PL Research, which the parent claims they chose nebulous "experience" over. I get that that the inventors of Go are respected people, but even they can mistakes.
- jlg23 10y ago> Besides being a subpar language that ignored the last 30 years of research at least Can beef that up with some arguments? The creators of Go are not ignorant, they just decided consciously to create a language easy enough for recent graduates to be productive quickly. From a science point of view, the only valid reason why clojure cannot compile to Go is that nobody cared to implement that.[1] Well, either that, or the people who considered doing that realized that compiling a programming language to a Chinese board game is equivalent to using an abacus and abandoned the idea .... ;) [1] https://en.wikipedia.org/wiki/Turing_completeness https://en.wikipedia.org/wiki/Turing_completeness
- mapcars 10y agoIt's funny that you think supporting 3 platforms is "portable". Check this out: http://sbcl.org/platform-table.html http://sbcl.org/platform-table.html http://www.rebol.com/release-archive.html http://www.rebol.com/release-archive.html
- jjnoakes 10y agoHe said 3 platforms, but he meant (and listed, so the meaning was obvious) 3 languages, some of which are indeed portable to a very large number of platforms.