DEV Community

Ersin Buckley
Ersin Buckley

Posted on

Learn functional, learn systems and learn object oriented

If you are a junior or intermediate, you should consider picking up projects or languages that help you round out the functional, object oriented and systems trio of languages. After 10 years of putting text files into compilers and interpreters, here is my take.

why we should do it

We should do it as a form of practice and professional development, even if we do not need it right now at our day job. Learning new languages increases enjoyment of coding, and brings fresh ideas to your craft.

Why functional?

Understanding pure functions is the reason you should pick up a functional programming language. This is one of the key ideas to writing test-able code. If you are new to functional programing, the experience can be a very steep hill climb. The reward in my opinion is the most impactful on the quality of code regardless of what other language you are using.

My recommended functional language is Clojure. The reason I picked up a lisp is that the language has a very strong foundation and an incredibly simple syntax. I believe it to be a 'stripped down' feel which helps you really zero in on the core concepts in the paradigm.

Why OOP?

An object oriented language is important to learn because it introduces a very familiar vernacular for modelling process, business and the world. Simply put, it helps you communicate about software projects with other people. On a technical level. Object oriented languages fill a pretty broad source of options, so it could be a difficult choice. For my own purpose I have chosen to become an expert in golang. Although a purist may rightly claim that Go is not OOP, I believe it fills that same niche. You can use the interface and struct features to achieve polymorphism.

The different object oriented languages I have used in my day job to this stage is vast. As you pick up the next one, it becomes faster and easier to get productive in the language.but The concepts boil down to just a few differences, and they all share many strong similarities in how they approach state, assignment and memory management. PHP, Python, Java, Golang, c#, Javascript being the ones I have personally used.

Why Systems?

A systems language completes the set of types of languages you should learn. You will learn to appreciate the high level of abstraction you can achieve with different languages. When I started working on projects with systems languages I also learned a greater depth about my operating system, infrastructure and memory management.

As programmers, our job is to create magic inside the box. When you understand the lower level of the abstraction you get to unveil the magic for what it is. Having a solid basis in a systems language will help you unveil problems when garbage collection or operating systems features are causing issues with performance

Right now I think the go language is my favorite pick for a systems language. It allows you to access the OS API with relative ease, and you get the compiled language which opens up really interesting project opportunities in the ops, sysadmin and SRE space.

In addition to this, it is worthwhile understanding the power of manual memory management. You can get this with languages like, c, rust or d. I wouldn't go so far as to say it is the most important concept to learn, but it can give you magical super powers when you really need code to perform in a reliable and fast way.

What it means to have a solid base

In an average coders career, you will learn a lot of different languages. Practicing learning languages opens up opportunities for picking up the most interesting projects. It broadens the array of problems you can solve. Hones your craft no matter what tool you are using to write that next best project.

It matters not so much which language you pick, but try to target the variety of niches which let you bring in the good ideas from the other platform.

What are your three picks under the FP, OOP and systems category?

Top comments (3)

Collapse
 
ashoutinthevoid profile image
Full Name • Edited

Personally I'm getting the most satisfaction out of Rust lately.

I don't use any purely FP languages, but Rust's abundance of built in ADTs, newtypes, and default immutability cover the things I most want from the FP paradigm well enough. Typescript with the fp-ts implementation of lightweight higher kinded types has a similar story for me.

Based on the list of OOP languages you've provided, I guess I fall into the purist category. I think specifically of languages with classical inheritance, and Id thus exclude Go (whose structs and interfaces are different enough - and vastly more pleasant - in my opinion) and JavaScript (even with all the modern sugar, it's still prototypal inheritance beneath that saccharine exterior some authors choose to adopt). I've used the other languages you list in the category, though some quite minimally, and my feeling is that any day that I don't have to use them is a good day (albeit a rare day given how widespread they are).

I haven't any idea what modern C++ feels like, not having used it since 2004 or so, and at this point I'm skeptical it would suit the way my tastes have developed since. I am curious where you would place it in the categorization you've presented. Definitely an OOP paradigm (well, back in 2004 anyway), but also quite suited to systems programming.

Perhaps the suggestion that one would have 3 presumably distinct picks is a little misleading, given how frequently languages begin to borrow from multiple paradigms over time.

Collapse
 
sethcalebweeks profile image
Caleb Weeks

I think OCaml fits my idea of FP the best, although I'm not all that great at it. OOP and systems programming are my weak points, but I would probably pick Crystal for OOP and maybe Go/Rust/Zig for systems.

Collapse
 
ebuckley profile image
Ersin Buckley

I haven't tried OCaml yet, but I like ADT's

Have you tried F#?

I looked at it briefly last year and it's quite cool how you get to use all the .net ecosystem but still use a fancy type system.

Similar to the way Clojure is great at interop with Java, but you get functional paradigm.