Ask HN: What language would you code if you didn't need to make money?

15 points by meiraleal ↗ HN
I'm currently a frontend JS/React engineer but planning to retire in one or two years (FIRE) and don't plan to stop coding, only not doing it for money. My language of choice will probably be Clojure.

48 comments

[ 2.4 ms ] story [ 88.1 ms ] thread
(comment deleted)
PASM

Parallax Propeller Assembly Language.

It is beautiful, more productive than it should be, and the chip is s lot of fun.

Haskell, hands down.

And here I thought there were jobs to be had in Clojure. Am I deluded by the functional Kool-Aid?

There are, they just aren't common. I'm only aware of two companies in my area that use Clojure at all. One is Walmart.
What's the other one?
I believe Cambia Health Solutions also uses Clojure.
Not sure if this counts but I really enjoy Terraform.
Probably depends more on the kinds of projects I’m doing in this hypothetical semi retirement hobby lifestyle :). If I’m playing with data science stuff, Python. If I’m in a large codebase, something statically typed. If I just want to learn languages, Haskell? Forth?
Haskell for anything on a system, Forth for anything on a microchip, React for anything in a browser with Rust for fast web code (in WebAssembly)
> Forth for anything on a microchip

2020 was the year I learned about Forth. It really is fun and practical. I run FlashForth on my Arduino Uno.

It really is. It's just it's too impractical under an OS. And there's not enough job postings/project managers that would consider Forth.
Ada, Erlang, maybe something like D. I'd probably find time to learn about all that category theory / lambda calculus stuff and use some more pure functional stuff.
I would code in Go.
I write Go at work I thought I would use it for a recent side project to avoid stumbling around another language, but I just couldn’t do it. Testing err != nil branches is excruciating. I have no will to do it except for money, and low test coverage makes me feel too dirty to be happy with my work if I skip it.
i find proper error handling to be just as interesting as coding the actual algorithm, especially server-side. debugging big distributed systems often boils down to how errors are handled. throwing an exception loses too much context and feels like cheating.
It’s interesting when there’s some way to recover from the error, but the vast majority of the time I’m just wrapping it and passing it up to the caller.

It also depends somewhat on how many potentially-error-returning calls are involved in an operation. Go’s verbosity means there can be 7+ different error return points in what would be a single statement in another language (HTTP request, subprocess, etc). I sometimes like the fact that I have to handle error for the operation generally, but not at that level of detail.

I am really comfortable using Javascript and PHP.

So, when it's a hobby, so as not to feel pressure, I program in these languages.

Probably still C++. Sure, it's got plenty of warts and pitfalls, but at this point I'm sufficiently used to the ones in the subset that I work in that I can just get on with the domain problem and not really have to think too much about the language.
Processing. The creative coding language.
I picked 11 languages that I found to be interesting:

C, C++, Python, JavaScript, Java, Ruby, Scala, Rust, Kotlin, TypeScript, Swift.

Then for each language I created categories (7 in total):

- Job Results from Indeed Japan

- Release Year

- Salary in Yen

- Stack Overflow's Dreaded Languages

- Stack Overflow's Loved Languages

- Stack Overflow's Wanted Languages

- Tiobe Rank

After that, I first discarded 63 % of the suboptimal languages from each category (37 % rule). And selected (roughly) 37 % of the most optimal languages from each category.

Finally, I gave a point for the top 37 % languages in each category, and it culminated to:

1. Python

2. JavaScript

3. Rust & TypeScript

4. C

IOW: the 37 % rule tells me that these programming languages are decent.

Python, JavaScript/TypeScript and C have a solidified job market already. (More than 9000 results; ignoring the outlier TS. A minimum salary of 800000 yen.) The only outlier with the lowest result was Rust. (Kotlin was the second lowest, and Swift the 3rd lowest.) But the heavy Stack Overflow weighing (42 %) brought Rust into the top 4.

So the answer is: Rust. (The language that I would like to use in a professional setting, but can't.)

Websites used:

- https://insights.stackoverflow.com/survey/2020#technology-mo...

- https://jp.indeed.com/

- wikipedia.org

- https://www.tiobe.com/tiobe-index/

I think the spirit of the question is "what if you didn't have to check other people's opinion and the job market to pick a language?", it's kind of the opposite of what you've done here.
Well not quite. I based it on the Stack Overflow developer surveys as well (Tiobe too). Tiobe is basically a measure for how often a language is searched for, if I am not mistaking. Rust for example has a small market share (based on the Indeed Japan results). I still want to use Rust (even if I don't get to use it in a professional setting).

Though, I understand your sentiment, but I guess it's a "technically I am right situation". Or what do you think?

Tl;dr: I picked Rust. :)

Edit: Though on a second thought: you are actually right! :) Sorry OP!

Python. I adopted when it wasn’t popular and I believe I’ll probably never find a better language for my sensibilities.
Python is so cool and old (1991) or let's say "battle-tested". I really like minimalistic languages like C (1972) and Python. It seems like minimalistic languages have higher chances of survival.
If I did not need the money I would never code again in my life, besides some automation and web scraping to archive stuff I want a local copy of. Life is simpler and happier for me when I minimise computer time.
Was money always the primary incentive or did you just lose the passion for programming over time?
Web development was gradually overcomplicated the past 15 years. There is no joy in it, yet it's where the jobs are. I envy people who are doing it in their spare time, but for me it's a special kind of hell. Low level and game dev is enjoyable but hard and demanding, not because it is bloated with shit we don't need, but due to its nature and restrictions.

I like minimalism in my own life, not the plan9 kind of autistic 'suckless' kind but the Zen Buddhist letting go variety. That's not what we have now in computer programming.

That sentiment is shared by a significant amount of people[1][2][3][4], it seems.

I am also sympathetic to minimalism in life (owning essentials only) and in many of my (programming) projects (single-header libraries[5], minimal dependencies).

I think I would be content with C, Bash, Python and SDL alone, if I wasn't so dependent on the need to "exchange my time for money". (And perhaps Rust as well.)

References:

[1] https://www.askonomm.com/blog/i-dont-want-to-do-frontend-any...

[2] https://jonathanwhiting.com/writing/blog/games_in_c/

[3] https://begriffs.com/posts/2020-08-31-portable-stable-softwa...

[4] https://copyanddesign.com/blog/the-benefits-of-static-websit...

[5] https://github.com/d26900/JamaisVu

I wouldn't code projects at all anymore but probably scripts or small things in Python or JavaScript when need be.