Programming Languages Rambling
Just a short ramble/summary of some programming languages that I have a decent amount of experience in.
My Favourites⌗
I love language features. I also love languages that free you from arbitrary syntax rules.
Scala⌗
-
Multi Paradigm: Its just like having more tools in your toolbox. Singletons are a primitive in the language which makes problems such as global configuration a non issue.
-
ZIO / Functional Libraries: ZIO is amazing. It has not only introduced me to the world of pure functional programming, but also sold me on it. The monadic way of programming with dependencies baked into the HKT is just elegant. It leverages the multi-paradigm power of the language unlike previous purely functional libraries instead of retrofitting haskell native concepts into Scala. Being about to define a database connection is needed directly into the type itself is like dependency injection 2.0.
-
Orthogonality: Everything is an expression. That is just crazy. Functions can be treated as values. Tradtional statements such as if statements can return a value.
-
Flexibility: I feel like Scala lets you treat it like a blank canvas. Want to nest classes or functions indefinitely. Do it. Want to capture your domain in the type system. Do it.
Rust⌗
I will virtually always choose rust if I need native performance. (Mostly desktop applications or fast startup requirements) I think Rust strikes a great balance between abstractions and complexity. The trait system is the an
What I don’t like The syntax. I get that it is supposed to be very similar to C++ as it almost like its progeny. I think the bulk of my distaste for the syntax would be the comparisons with Scala’s. Things such as;
- Mandatory semi-colons: Symbols that don’t need to be there. Scala returns the last line on scope the same as Rust, so I don’t think that is a valid reason for its requirement.
- Angled brackets for generics & lifetimes: Scala uses square brackets. I don’t know why, but it is just easier to read.
- |x,y| lambdas: Only minor. Why are || used for lamdas and not a tuple syntax ()? I am kind fond of the universally accepted => symbol.
- rustfmt: Why are half the features in unstable. Single line functions and if statements are still not stable… Chain width being based of cols and not individual chain calls?
- Ownership: Just kidding.
First Language to Learn⌗
Java (or C#) - For Concepts⌗
I believe that Java gives a solid basis on which to learn basic programming concepts on.
Forces learning of;
- Primitives And Objects:
- Basic Object Orientation:
Python - Just Solid⌗
Data science, Web development, scripting. Nice to get things off the ground and write production ready code quickly. It might just be a little slow for some use cases.
JavaScript/TypeScript - Ubiquitous⌗
Super large ecosystem that mainly targets the browser. Good for getting instant feedback for your learning by creating interesting things. It does not do very well in teaching basic computing principles however.