3 ms·
I've learnt C/C++ (same category as Rust) & Haskell & Lisp, and I've had an epiphany with each of those, that significantly shaped my programming ability today.
by meric 11y ago
I've learnt C/C++ (same category as Rust) & Haskell & Lisp, and I've had an epiphany with each of those, that significantly shaped my programming ability today. I have not yet learnt Prolog or Erlang.
Rust is in the same category as C - just better designed. If the OP wanted to learn a compiled, low level language, to learn the paradigm, I'd suggest Rust for minimised frustration. C/Rust has minimal static type checking system, is performant and low level, compiles to machine code. They are both imperative languages that map relatively close with the underlying assembly.
Haskell has a much more sophisticated type system that integrates closely with the rest of the language, e.g. pattern matching. I don't know how to describe it in detail without resorting to Haskell jargon. The difference between the type system of Haskell and Java/C is as big as the difference between Java and a language without class/types. I think I "got it" in the 4th of my 8 month honours thesis, written in Haskell. You know about Java's classes and interfaces? They're human constructs, like a set of paintings by the same author. You could put them in different arrangements but you're sort of limited in what arrangements you can put in. Imagine if those type ideas were distilled to a mathematical definition with some sort of axis (like the real number maths where you can intertwine +, -, *, % operators), that are building blocks which can build on itself, then you have the Haskell type system. It's a lot more "pure".
Lisp's type system is akin to Python's, it doesn't really check until runtime. The biggest difference between Lisp and Python it's meta programming abilities. Have you heard about C macros? Imagine a language where it's macro language is the language itself. You could write your own language constructs, operators, etc. That's Lisp.
- pizza 11y agoThanks for this! Cheers