5 ms·
Ask HN: Which programming language should a journeyman programmer learn?
Hello HN,
I'm looking for some advice and/or enthusiasm on which programming language you might recommend to a young journeyman programmer looking to broaden their horizons beyond the mainstream imperative stock.
As some background: Like many from the past decade, I was introduced to programming and cut my teeth via Python, and while it holds a soft spot in my heart for its lovely syntax and idioms (personal preference), I am growing weary of chasing down run-time errors in production and the squishyness of its type system (or lack thereof).
From there I've followed along the well-trodden path of imperative/OO languages one would expect to become acquainted with during the "standard" CS education, namely C & Java, along with some Golang thrown into the mix. I adore C for its close mental alignment to the computer's operations, and while I appreciate Golang and Java and have no great qualms with either, they don't scratch a certain itch.
My daily driver at work is Typescript. I find writing vanilla js to be generally objectionable.
I would classify myself as a competent journeyman, and I am really looking to branch out and broaden my perspectives. I'm not sure what itch it is I'm trying to scratch, but I'm looking for an enthusiastic community and a language that brings a lot of "joy", if that makes sense. I'm not looking for any commercial benefit out of this, but hey, if being an expert in the lang is highly profitable, that's also a data point.
A good type system might be where my interests are first piqued, but it's not a hard requirement. Similarly, my mind jumps to Functional Programming, but purity is not a requirement either.
So, if you're an experienced vet, found yourself in a similar situation beforehand, have been having similar inclinations, or are just a fanboy/girl for your specific lang, please share your thoughts!
Should I be wrangling data functional-style sans types with Clojure?
Playing around with the BEAM with Elixir/Erlang?
Diving into Scala types and the Akka framework?
Jump into the deep end with Haskell?
Try my hand at Rust and systems software?
Ocaml, a language I know nothing about?
I have formal CS training, so I'm not overly intimidated by the more "academic" languages.
Thanks a lot in advance!
- eternalban 5y ago(You should prepend "Ask HN:" to your post's title.) This almost sounds like language as an 'intellectual pet' type of motivation, which is ~somewhat at odds with "broadening my horizons". Why not explore 'new [advanced] things to create' in one of the most fun languages you already know? Or, get excited by exploring a dimension such as 'performance', or 'distribution', etc. So, my 2c is first decide if you want to be a linguist or a writer.
- blueslurpee 5y agoEdited. And fair enough point. To use your analogy, this question is more of the "linguist" side. If I were solely interesting in the "writer" side, I would be building distributed systems in Go.
- eternalban 5y agoIn that case, something like Prolog would definitely be a change and possibly a lot of fun to explore but I have no idea about the community. I also liked Chapel [1] a lot when I looked at a couple of years ago (again modulo community). If you are into distributed systems TLA+ could be a nice thing to know though obviously it's not a general purpose language. [1]: https://chapel-lang.org/ https://chapel-lang.org/
- bradcray 5y ago@blueslurpee: I'm definitely biased, but agree that Chapel would be a fun language to explore, particularly if you're interested in looking at integrated task- and data-parallelism within a language or distributed computing with a partitioned global namespace. If you do, feel free to reach out with questions/comments/requests on Stack Overflow, Discourse, GitHub, Gitter, etc. [1] -Brad [1]: https://chapel-lang.org/community.html https://chapel-lang.org/community.html
- eternalban 5y agoI have a question for you Brad (hope you see this): How would you characterize the suitability of Chapel for (what is being called) ML-Ops both in terms of work distribution (something like 'Ray' etc.) and interop with ML/GPU libraries and frameworks?
- laumars 5y agoSounds like you’ve already done a fair amount of homework yourself. Threads like these are often just an excuse for people to preach their own personal preference so I think your should use your own experiences and future projects to guide you. But if you’re really after a recommendation, then I’d suggest either go for a functional language (like a LISP, Scala, OCaml, etc) or a low level systems languages (like Zig or Rust). Or even one that overlaps with both domains? It really does just depend on what you want to do next though. Nobody else can tell you that.
- blueslurpee 5y agoThanks a lot. The general hope of the question, was in that there may be people like me on HN who had a similar itch at around year 2-5 in their career. In general, it's a low-risk decision, because it's only for personal enrichment. But time is precious at the moment and it would be quite a good bit of fun to hear from some people that simply ~love~ their language. I know, I know.. questions like this can sometimes lack rigour and lead to a simple cheerleading fest, but I was hoping for a relatively lighthearted thread. I am also convinced this is not an isolated feeling on my part, what I mean by that is, I'm sure this is a relatively common phenomenon among younger engineers who enjoy CS in and of itself, and I would be very interested in hearing what they have to say. Thanks for the Zig recommendation!
- deleted 5y ago[deleted]
- jim-jim-jim 5y agoHaskell is the "deep end" in terms of its ideology, but not difficulty. In practice, I've found compromise languages like Typescript and Scala more challenging because they're everything to everybody. If you already enjoy the benefits of types and want to explore that avenue further, then Haskell makes more sense than some of the alternatives.
- blueslurpee 5y agoInsightful comment. In general I prefer tools that have a prescribed way of looking at the world and don’t try to be everything to everyone. That said, I feel a certain allure to the depth and “wizardry” that I’ve heard so much about in Scala, which doesn’t generally fit this mold. So at the moment I really think I’m stuck between Scala, Haskell, or Elixir. It’s tempting for people to simply say, “Learn all of them” but for practical reasons that’s not possible at the moment. So thanks a lot for your comment.
- JoelMcCracken 5y agoI would advise looking at Haskell. There is just so much there, and while you learn it you get so much exposure. Elixir is def cool but keep in mind that it is just much more normal of a language. You can probably learn it in a few weeks. Haskell is a much longer journey
- blueslurpee 5y agoOkay, I think this and the sibling have tipped it. Sounds like Haskell is where I will land and the best place to start branching out. Appreciate you!
- jim-jim-jim 5y agoFor what it's worth, I write Scala professionally. I don't think I'd be nearly as successful with it if I hadn't learned Haskell first. ymmv, but it's helpful to divide and conquer. Haskell is a much cleaner way to "learn FP." You can take almost all of that knowledge and staple it onto Scala later. Learning the universal and ultimately quite simple concepts that comprise FP alongside the Scala language itself seems needlessly painful. The noisy syntax and compiler quirks will obscure whatever wisdom you're hoping to squeeze out of the process. So yeah, learn Haskell, then make money with Scala.
- drKarl 5y agoSo, since you mentioned Java, Kotlin and Groovy are very pleasant to write and quite easy to learn, lots of syntactic sugar. I'd say Kotlin is a better language than Groovy. Scala is a very deep language to learn, lots of fascinating features, just reading Programming Scala is amazing and totally recommended. The learning curve is steeper to get to more advanced concepts but it is worth it. Rust is not as difficult to learn as Scala, not so many features and concepts but it's a bit difficult to wrap your head around borrowing and lifetimes mostly, and some of the smart pointer stuff. I wouldn't recommend lisp or derivatives like Closure etc mostly because of the parentheses. It is said the last 3 pages of the code that controlled the Soviet nuclear launch codes written in Lisp are just ending parentheses. To scratch your itch of broadening your horizons and learn lots of amazing features that don't exist in the languages you know (Python, JavaScript, Typescript), I recommend Scala
- blueslurpee 5y agoI can’t say I’m too jazzed about Kotlin or Groovy, but Scala on the other hand sounds really brilliant!
- auxym 5y agoPersonally, as mostly a hobbyist, I've been having a lot of fun lately with Nim, including running it on microcontrollers!
- jguzmanjr 5y agoI’m a fan of Rust. Discovered it in mid 2020 and am loving every piece of it. It does have its warts (e.g. incomplete async story) but what language doesn’t? In particular I like its chatty compiler — lots of d’oh mistakes are caught while the code is still fresh in my mind for example. I also like reading blog posts about Rust; currently going through this: https://fasterthanli.me/articles/some-mistakes-rust-doesnt-catch https://fasterthanli.me/articles/some-mistakes-rust-doesnt-c...
- throwaway81523 5y agoI would say Haskell. You might not find it directly useful in practice, but it will strengthen your mind like nothing else on your list.
- gorjusborg 5y agoI would recommend a lisp (scheme is beautiful) if you're looking to see things a different way, and grow. I found its depth of history and its elegant simplicity inspiring. If you want types, I'd check out Haskell, or OCaml or F#. So I guess what my advice is decide how you want to grow and choose a language at that extreme. If you've learned a mainstream get it done language you wont get much out of learning another one.
- georgia_peach 5y agoLisp/Scheme are great brain-expanders. So is APL. For long-term maintenance, the more static typing the better, so I wouldn't use them for anything big, but they're great for one-off problem solving. Before anyone chimes in with "you can do that with macros," patched-in and after-the-fact typing doesn't count. Go is a strange mix of functional and imperative that, despite its simplicity, is illuminating in its own way. Getting to really know the shell and regex, inside and out, can also be a revelation.
- medo-bear 5y ago> Before anyone chimes in with "you can do that with macros," patched-in and after-the-fact typing doesn't count. Why not? Common Lisp macros allow a programmer to implent a new language and to make optimizing compilers. Take for example Coalton, which is a strongly, staticaly, and strictly typed language that can interact with the base language
- georgia_peach 5y agoThe base specs of lisp/scheme aren't statically typed. If some lisp-like is statically typed from square-one, that's nice, but it's not really lisp at that point. If I can copy-paste unmodified CL code into Coalton, and it still runs, then Coalton's typing isn't particularly strict. If I can't--if I have to add some form of escaping or FFI decoration--then Coalton isn't lisp. Not that that is a bad thing--just wasn't what I was writing about.
- medo-bear 5y agoCoalton isnt a lisp, it runs on top of a lisp. Common Lisp provides you with primitives so that you can implement things like this in ways that are much more straight forward than in other languages. This is one of key defining features of being a lisp
- medo-bear 5y agoLook into Common Lisp and Coalton used in quantum computing https://coalton-lang.github.io/ https://coalton-lang.github.io/
- emteycz 5y agoProlog!
- srivathsaharish 5y agof# all day long