Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The idea of having a primary language honestly comes off to me as a sign that the developer hasn't spent much time programming yet: the real world has so many languages in it, and many times the practical choice is constrained by that of the platform or existing code to interoperate with.

I've been writing code for ~18 years, ~10 professionally. I've programmed in (chronological order here) Modula-2, C, Basic, the HTML constellation, Perl, XSLT, Ruby, PHP, Java, Mathematica, Prolog, C++, Python, ML, Erlang, Haskell, Clojure, and Scala. I can state unambiguously that Clojure is my primary language: it is the most powerful, the most fun, and has the fewest tradeoffs.

Like Haskell, I view Clojure as an apex language: the best confluence of software ideas towards a unified goal. Where Haskell excels at lazy, pure, strongly typed problems, Clojure is my first choice for dynamic, general-purpose programming. I wish it were faster, that it had a smarter compiler, that it had CPAN's breadth, that its error messages were less malevolent, that it had a strong type system for some problems. But for all this, you gain a fantastically expressive, concise, rich language built out of strikingly few ideas which lock together beautifully. It gives you a modern build system, a REPL, hot code reloading, hierarchies, parametric polymorphism, protocols, namespaces, immediate, lazy, logical, object-oriented, and functional modes, rich primitives, expressive syntax, immutable and mutable containers, many kinds of concurrency, thoughtful Java integration, hygenic and anaphoric macros, and homoiconicity.

Were Clojure to cease, I would immediately endeavor to replicate its strengths in another language. That's a primary language to me. ;-)



It seems to me that Clojure exists on the idealogical extreme opposite of Haskell (standing next to it's little buddy Scala).

How did you go from one extreme to the other and pick it as your 'primary' language.

Isn't it like saying "I really like President Obama, but my favorite politician is Rick Santorum".


Different techniques are useful for different problems. Sometimes you really want a powerful type system: it makes invariants for safety, concision, and speed available that you can't get any other way. Other times you want a more dynamic type system: especially where you don't really know the full shape of the problem yet. This is a choice you have to make, as a language: where on the type continuum do you fall? It's partly technical, partly cultural. When done well, it pervades the language offering tremendous power--but it is a choice.

In many other respects, Haskell and Clojure are ideologically similar. Both emphasize immutability, referential transparency, higher-order functional programming, and laziness. Clojure chooses to layer this on top of a mutable core; Haskell uses monadic combinators. Again, there's a difference of perspective. Haskell's technical emphasis on purity makes powerful invariants available to the compiler, but requires some serious type acrobatics for concurrent stateful operations. Clojure gains the ability to drop to mutability in a simpler way, but places the burden on the programmer to keep track of side effects: relying on culture to maintain sane guarantees.


They have both have immutable data structures and i realized just now, that is after GC the second most important feature i want in a high level language.


Ok. and what answer did you leave for this survey, given that "Clojure" is not valid? ;P


Prior to Clojure, my primary languages were Ruby and Erlang. Where Clojure or Java libraries are available, Clojure is typically a functional superset of Ruby. Blocks are used as weak macros, that sort of thing. Erlang/OTP is pretty unique in my experience; while actor models are common in various languages, nothing comes close to OTP's treatment of failure modes, upgrades, and distribution. I also miss Erlang's pattern matching, though Clojure's destructuring bind is sufficient for many cases.


... so... you agree with me, that having to choose a single primary language doesn't work. The question was both worded quite explicitly to force you to choose a single language, and if you add up all of the percentages you can tell that the original form actually required only a single answer. My feedback was "people often don't have a single answer to this question", and after you spent multiple paragraphs attempting to claim I was wrong, when I asked you to actually tell me how you'd have answered the question, you came back with two answers. The question either needs to be reworded to allow for multiple answers or it needs to be reworded (in the way I attempted to provide an actual example of, putting in actual effort on my part to help future implementations of this survey) to help the person answering choose a single one.


Choosing a single primary language does work because it's an informal web survey about a programming language. It's not a contract or a test of loyalty/zealotry. Your position here seems like getting upset when asked what your favorite sandwich is.


I am someone who is interested in Clojure trying to learn something from a survey that was posted, and I'm providing constructive feedback (explicitly constructive, as I went out of my way to carefully come up with an improved wording that could be used for one of the questions) to further that goal. To help demonstrate that the question was confusing, I asked someone here to answer it, and he came up with multiple answers to the question, which was the very way I claimed that the question failed, as the question only allowed a single answer. I don't care about "contracts" or "loyalty/zealotry": I care about trying to come up with an improved survey that has answers that mean something. I'm "sorry" that no one else does, and that they would rather type long replies about how much they love Clojure than discuss issues in question design on a survey... whatever.


I answered "Ruby" on the survey without question: in my case, it has significantly broader applicability than Erlang.

In more general terms: no, I don't see this as a critical methodological error. Could it be "Pick your top n"? Sure, might be useful. Yet, I've never met a programmer who had trouble with "What's your [primary|favorite] language?", and the survey made it clear what to do in cases where more than one option applied: pick one, and don't worry too much. Survey design is always a balance between specificity and nuance, and I think in this case he made an OK call.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: