Hacker News new | ask | show | jobs
by spruciefic399 2910 days ago
Honestly, I might just jump in and learn Rust.

I think it's a good place to start with memory management issues because you have to deal with it but good practice is enforced. C/C++ is the obvious alternative for that level of programming, but it's less constrained, which is better in some ways but bad in others. If you're wanting to learn Rust eventually, you might as well start there.

If you're wanting to not start with the low-level memory management stuff, and want an introduction to programming per se, there's lots of options.

One thing to think about is OCaml. It's a nice language, similar to Rust in some regards, and in fact Rust was originally written at least partially in OCaml, and for awhile was kind of discussed as a derivative of OCaml in some places. You'll get a mixed imperative-functional kind of introduction without going to quite as low of a level.

Another approach is to to just learn a language. In that case I'd probably recommend Python (probably Python 3) or javascript, because there will be a ton of resources and the skills will directly transfer. If you're looking for something that's maybe more niche but "clean" you could try Julia or Nim. Julia's very numerics focused and is getting used in that area, but doesn't get used out of that, at least so far. Nim is very very niche but a good language, similar to Python but faster and cleaner and some ways. Another thing to think about is Scala, which might transfer to Rust in some ways better than the others (except OCaml).

Honestly, though, I might just start with Rust. It will be heavy going at first, but I think learning the memory stuff is very very useful later. It depends, though. I think you have lots of good options. What's most important is to just dive into something that's interesting to you and start creating stuff, regardless of how small it is. A lot of concepts will transfer across languages.

2 comments

C/C++ is the obvious alternative for that level of programming, but it's less constrained, which is better in some ways but bad in others.

C++ is an archaeological dig of a language, which has about 4 major strata. It can be an entirely different language project to project, depending on how you use it. However, I suspect that a particular C++ style using smart pointers and RAII can be a good preparation for Rust. This is especially true if you can contrast that C++ style with some other woolier style of C programming.

If you want to be very knowledgeable, 1) write a compiler that produces machine code and 2) do some concurrency.

What's most important is to just dive into something that's interesting to you and start creating stuff, regardless of how small it is. A lot of concepts will transfer across languages.

The best advice by far.

> C++ is an archaeological dig of a language, which has about 4 major strata. It can be an entirely different language project to project, depending on how you use it.

This should be the canonical way to describe it. Brilliant.

This is THE reason that I don't recommend C++ as a stepping stone language. If you need it use it, no hate, but it can make using online resources a mishmash of guesswork until you grok the history of the strata.

Ugh. I was there for all those strata. I feel old now...
I have what I have been told is 'expert' level knowledge in bash - how do I translate that knowledge into another language?
Start learning another programming language. Maybe two or three. They aren't like spoken languages: there are only a few words, and syntax is explicit.

Programming languages will feel a bit foreign since there are different paradigms involved, but you have a solid perspective to start with.

Since you know bash, you know the environment your programs will run in. Start by learning simple IO with stdin, stdout, and stderr. The rest is basically just different methods to organize your code.

Try a dynamically typed language like Ruby, Python or Lua. It's closest to Bash, but different enough to let you learn the power of a true programming language.

Then try a statically compiled language like F#, C#, OCaml, or Kotlin, depending on what kind of platform you like.

Then try a lower level language like C, Ada or Rust.

There are of course completely different paths you could also take, like tossing Prolog or Haskell in there somewhere, but the above path will cover the basics of what's most widely used in industry, ie. functional, imperative and OO paradigms, curly brace syntax vs indentation based syntax, the common control flow abstractions, statement oriented vs expression oriented languages, and statically and dynamically typed languages.

Hmm might be good to think about this as what career path you'd like. If you're IT for example and want to move into ops or something, maybe you can start looking into writing things for chef or puppet.
Study C then some assembly, meanwhile learning basics of computer engineering, have a solid understanding of discrete math.
You don't really "get told" you're an expert at something-- if you're waiting for someone's certification that you're an expert, then you're probably not an expert.

I don't mean to diminish what I'm sure is your extremely proficient grasp of bash; rather I mean to diminish the way you presented it. If you're an expert, you know it without being told.

I think he's just being modest and not claiming that he's expert, just that he's considered to be one. You're reading way too much into that single sentence.
On the contrary; I've been told I'm expert level at things I don't consider myself an expert in. I always chalked it up to the fact that "the more you know, the more you realise you don't know"