Live data from Hacker News

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

interconnected.org

51–57 of 57 posts

Re: The subjective experience of coding in different programming languages (2023)

#51
post #11

Earlier quoted context omitted.

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.

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.

Re: The subjective experience of coding in different programming languages (2023)

#52
post #27

Earlier quoted context omitted.

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.

Re: The subjective experience of coding in different programming languages (2023)

#53
post #28

Earlier quoted context omitted.

Java gives me similar feelings to what people say about Go: it may be a little verbose, but you always know exactly what to write and how to write it, and looking at other people's code you get a very good sense of what it does because it follows very familiar patterns. The "brotha, eugh!" feeling comes from the enterprise frameworks, which tangle all that up in a mess of factories, DI autowiring, and inversion of co…

"Proper" generics, value types, LINQ, operator overloading, excellent native interop etc make a big enough difference to me atleast to prefer c# over java. Is being "Microsofty" a bad thing and "Oracly" or "Googly" a good thing?

It's more of a "I recognize coding styles and conventions associated with this company" than a judgement of good or bad.

Re: The subjective experience of coding in different programming languages (2023)

#54
I seem to recall reading an interview with William Gibson in which he said "someday we might have little squishy things that can read any form of physical media you wrap them around". That's what working in Lisp feels like to me. It's something squishy, and you can wrap it around any sort of problem and solve it fairly quickly. Smooth it out enough and it might even be an efficient or elegant solution. I've compared Emacs to a beanbag chair because it too is squishy, comfortable, and once in it it's difficult to leave, nor do you particularly want to.

Languages with nice type systems, like Standard ML or Ada, have the feel of Buckminster Fuller's tensegrity constructs: rigid yet flexible.

Re: The subjective experience of coding in different programming languages (2023)

#55
post #48

I am curious about people's experiences who are really good and use the following languages regularly: C, OCaml / Haskell (although Haskell feels way different to me), Common Lisp (or any Lisp), Erlang / Elixir, and Forth / Factor. To me, these languages seem to be significantly different. Edit (before I will not be able to do so): thank you for everyone's replies (in advance, too)!

I've been working with functional programming languages for the most part of my career now. Mostly Elixir and Clojure, but some OCaml/Haskell too. I believe after FP "clicks", there is no going back. Everything else feels just so unnecessarily complex. My favorite is still Clojure by miles ahead, besides it being a functional language, its data-oriented approach to writing programs is completely different from anythi…

> gosh, this would be so much simpler to solve in Clojure

My colleagues are so sick of hearing this.

Re: The subjective experience of coding in different programming languages (2023)

#56
post #48

Earlier quoted context omitted.

I've been working with functional programming languages for the most part of my career now. Mostly Elixir and Clojure, but some OCaml/Haskell too. I believe after FP "clicks", there is no going back. Everything else feels just so unnecessarily complex. My favorite is still Clojure by miles ahead, besides it being a functional language, its data-oriented approach to writing programs is completely different from anythi…

> gosh, this would be so much simpler to solve in Clojure My colleagues are so sick of hearing this.

How come? Genuinely curious.

I feel the same way with Go, OCaml, Factor, Erlang / Elixir, Common Lisp, and even Perl, depending on what I am doing. Heck, I still have new projects written in C due to its simplicity, which is what I want sometimes, and more control.

Re: The subjective experience of coding in different programming languages (2023)

#57

Earlier quoted context omitted.

> gosh, this would be so much simpler to solve in Clojure My colleagues are so sick of hearing this.

How come? Genuinely curious. I feel the same way with Go, OCaml, Factor, Erlang / Elixir, Common Lisp, and even Perl, depending on what I am doing. Heck, I still have new projects written in C due to its simplicity, which is what I want sometimes, and more control.

I end up working with a lot of data transform pipelines, and Clojure's strong support for names (with namespaced keywords) and generic data structure manipulation makes the code you have to write more succinct.

This kind of task is also extremely well suited to a repl. You define a temporary var, and start threading it through a series of super small functions that only slightly change the data until you get what you want.

    (->> my-data 
         parse
         (filter some-pred)
         (map my-mapper)) ;; and so on, if you need more
        
For me, the big thing is REPL driven development, and immutable data structures. Everything can be inspected. It's easy to get insight into basically any small piece of the program as if you were using a debugger (but you don't have to).
Post reply on HN