Skip to content

Comment on The subjective experience of coding in different programming languages (2023)parent

Comments

Which languages do you code in? Because for me the available mental structures I can use to think are radically different when I code in golang as compared to elixir, just because they have radically different paradigms for approaching data transformation.

Elixir is spectacular for visualizing, it’s all just changing the shape of your data all the way down, and all the standard modules have exactly the right tools for doing whatever step needs to come next. It’s so easy to find yourself zoned in. Go has the rhythm of error handling everything, it feels like you’re steadily plodding along with these mini checkpoints.

Yeah, if not for these checkpoints I think I'd have a much more fluid experience with golang, but I respect the fact they didn't choose to implicitly send errors through the callstack, I just never managed to find a good solution for making these callstacks clear.

Take this function I contributed not long ago to the project I work on: https://gitlab.com/nunet/device-management-service/-/blob/aa...

In it for each step in the procedure of saving the config file I need to check whether it's successful, otherwise send back the callstack. I often find it confusing to navigate back when I have an error and to maintain code that has many such steps.

I am competent or better in about 10 languages (a couple in each of the major programming paradigms), but in my current position I primarily use C, C++, and Python. I don't know golang or elixir.

I've dealt with C in college and nothing more, so for me It's just a bunch of macros on top of assembly. C++ was the language we used in OOP class, I know it's a beast of many faces, but we used it mostly like you'd approach using java. Python is very expressive but I think it's closer to C when compared to elixir because it lacks advanced pattern matching. I think the four main domains are procedural, object oriented, functional and visual (programming in excel for instance). Navigating those realms unlocks different ways of thinking and different mental structures. None is better than the other, they just lend themselves better to different classes of problems, and choosing the one that fits best your experience and the target domain will make it more likely to get in the zone when using these technologies.

I get synaesthesia in some languages (smalltalk, sclang, forth, lisp, occasionally perl) but not in any others. But I don't know if that has to do with the language or with the kind of projects I do in them, and I'd love to figure out a way to determine that. Maybe I should try writing a generic "not-in-domain" project in one of those and see.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.