Recommend me a programming language

I’ve been working with a Javascript (+ TypeScript) + Java + SQL stack for the last 10 years.

For 2024 I’d like to learn a new programming language, just for fun. I don’t have any particular goals in mind, I just want to learn something new. If I can use it later professionally that’d be cool, but if not that’s okay too.

Requirements:

  • Runs on linux
  • Not interested in languages created by Google or Apple
  • No “joke languages”, please

Thank you very much!

EDIT: I ended up ordering the paperback version of the Rust book. Maybe one day I’ll contribute to the Lemmy code base or something :P Thank you all for the replies!!!

bungle_in_the_jungle ,

Python seems to be a staple for as long as I can remember and it looks like it’s still gonna be going strong for a good while yet!

I’m thinking of taking the dive and finally learning it myself soon.

ebits21 ,
@ebits21@lemmy.ca avatar

Great for prototyping and quick scripts.

That and such rich set of libraries for anything you want.

krash ,

If you decide to take the plunge, I highly recommend the programming course on mooc.fi.

bungle_in_the_jungle ,

Hadn’t heard of that, will check it out for sure. Thanks 🙌!

krash ,

Anytime. Their discord community there is very active and helpful. If you’d like help or feedback without getting muddied by discord, feel free to inbox me.

zik ,

Python’s become very widely used in industry - it’s definitely a plus when looking for jobs these days. TIOBE now says it’s the most popular language in the world.

notnotmike ,
@notnotmike@programming.dev avatar

Python is especially great for quick scripts or PoCs. I’ve been using it a lot lately to prototype some things and it just makes it a breeze

Main complaint is the snake_casing convention. By far my least favorite

GBU_28 ,

Hah I love snake case.

I also love python for distributed micro tasks and data pipelining

pkill ,

I am the only person that feels like snake casing belongs in declarative stuff, data serialization etc. (SQL, protobuf, JSON, YAML…) while camel case elsewhere?

GBU_28 ,

I don’t hold any of that, I just find it the most readable for me.

henfredemars ,
@henfredemars@infosec.pub avatar

Packaging solutions kinda sucks, but we’re about to get a JIT in the main CPython so that’s exciting.

Kushia ,
@Kushia@lemmy.ml avatar

When I used to work a lot with Python the packaging solutions available were the bane of my existence. I hope they’ve gotten better by now…

xmunk ,

PHP is a really fun language syntactically and has a surprisingly good built-in library.

pathief OP ,
@pathief@lemmy.world avatar

PHP was my favorite language like 20 years ago but I don’t think I ever want to touch it again xP

rikudou ,
@rikudou@lemmings.world avatar

Absolutely different language nowadays, really worth a try!

xmunk ,

If it was your favorite language twenty years ago then you’ll hate it now - it supports functional programming and cleaned up (nearly) all the awful cruft.

scorpionix ,

As a PHP Dev: Please avoid PHP unless you have to use it.

rikudou ,
@rikudou@lemmings.world avatar

As a php dev who actually writes clean code and doesn’t blame people writing shitty code on a language: don’t listen to this fella.

scorpionix ,

As a php dev who actually writes clean code while cleaning up after other people because Getting things done is more important: Don’t give people the tools to write shitty code.

xmunk ,

I know it’s fashionable to shit on PHP but it’s significantly better than it once was… it’s honestly like a cleaner python that lets you use brackets.

Fal ,
@Fal@yiffit.net avatar

Cleaner python? Hahaha that’s hilarious

scorpionix ,

Sure, could be/was a lot worse than today. Still, PHP gives one way too much rope to hang themselves with.

xmunk ,

Hey, I grew up on C++… you’d be amazed how comparatively safe PHP is by comparison. I don’t disagree though, but I do appreciate having features like var-vars around for when I need them.

emuspawn ,
@emuspawn@orbiting.observer avatar

What would you recommend learning instead?

scorpionix ,

My team is currently exploring rust as an alternative because we have to do a lot of api calls and data crunching real fast. So rust?

Bezier ,
@Bezier@suppo.fi avatar

As the other person said, Python. Or if you want something lower level, how about Rust?

Fal ,
@Fal@yiffit.net avatar

Rust doesn’t even have to be lower level

JakenVeina ,

C# has been doing a lot of really cool things lately, and has first-class Linyx support.

key ,

Kotlin would be the most straightforward/useful professionally if you’re primarily Java. Other Java stack options are Scala or (shudders) Clojure

abbadon420 ,

What’s wrong with clojure? (Serious question. I saw someone else recommend it in this thread)

Floshie ,

Kotlin is by far my fav language. I’ve been astonished by its capabilities used with the “Exposed” library

Aatube ,
@Aatube@kbin.social avatar

Yeah! It can even compile to JS and the JVM! Interestingly, it also supports the functional paradigm as you can see when programming with Compose.

chris ,
@chris@lem.cochrun.xyz avatar

Id suggest rust, gets you a step closer to the hardware and a bit of a different paradigm than Java while still feeling high level.

pathief OP ,
@pathief@lemmy.world avatar

Rust is definitely something I've been keeping an eye on. The syntax looks a bit scary, to be honest, but looks very versatile.

Fal ,
@Fal@yiffit.net avatar

Definitely rust, and definitely use rustrover from jetbrains for an IDE. It's amazing

BiggestBulb ,
@BiggestBulb@kbin.run avatar

I see you mentioned JS, but not TS. If you haven't tried TypeScript, you 100% should! It helps a lot at scale.

Also, I really do recommend Rust. It's pretty awesome having the errors actually make sense, and it's not as complicated as the hype makes it out to be (until you get into async rust lol).

As others have mentioned, C# is also awesome.

pathief OP ,
@pathief@lemmy.world avatar

We do use TS as well, yes!

Rust is definitely a language I’m considering. Syntax looks a bit scary, though!

technom ,

Syntax isn’t the scary part - it’s the concepts. You need a decent understanding of the hardware to make sense of the language rules. Rust has a lot of high-level abstractions (like other modern languages and unlike C). But they don’t deviate from what the hardware limitations dictate.

Fal ,
@Fal@yiffit.net avatar

Rust syntax is totally fine really. It often feels like writing python

joelthelion ,
@joelthelion@lemmy.world avatar

Rust, haskell, python, c++ are all interesting choices. I would argue that c# is too close to what you already know to be interesting.

If I were you though, I’d pick a project first, then decide what language makes sense for it.

Corngood ,

This is my favourite list in here, but I’d throw a Lisp in too.

Lisp, Haskell, and Rust should all teach you something new and profound about programming.

joelthelion ,
@joelthelion@lemmy.world avatar

Lisp is the only one I haven’t learned yet 😁

pathief OP ,
@pathief@lemmy.world avatar

If I were you though, I’d pick a project first, then decide what language makes sense for it.

Certainly the best approach is to use the best language for your project. Right now my project is to learn something new and exciting, I bet when I start learning the ropes I’ll get some ideas!

Azzu ,
@Azzu@lemm.ee avatar

I love Clojure+Clojurescript

Semi-Hemi-Demigod ,
@Semi-Hemi-Demigod@kbin.social avatar

I'm gonna be the weirdo recommending Ruby. I really like it as a language, and it's pretty fun to write. Plus it's got a lot of libraries so you can do fun projects like Discord chat bots.

Fal ,
@Fal@yiffit.net avatar

I absolutely hate ruby. I would almost rather write php. Ruby just feels like every decision they made is wrong, and designed to add confusion.

Semi-Hemi-Demigod ,
@Semi-Hemi-Demigod@kbin.social avatar

I feel like you and I wouldn’t get along

Fal ,
@Fal@yiffit.net avatar

Maybe. I just do not understand the love for ruby. Literally all the ruby code I’ve ever seen is just awful. Which isn’t necessarily a dig at the language, but it just seems like it makes it so easy to write terrible code.

Also, what’s the deal with unless? “Do this unless …” is so unintuitive it’s almost like it was designed that way as a joke.

Reptorian ,

I been meaning to learn Ruby to get around using Python. I like Ruby syntax better.

abbadon420 ,

I have this one weird friend who does competitive one-line-programming in Ruby. It’s supposedly the best one-liner language.

Semi-Hemi-Demigod ,
@Semi-Hemi-Demigod@kbin.social avatar

I can believe it. The way Ruby implements "everything is an object" gives it amazing flexibility. Though the one-liners for Ruby aren't as intricate and beautiful as Perl one-liners.

DirigibleProtein ,

Ada and COBOL are still where the big money is, and still will be for years to come.

losttourist ,
@losttourist@kbin.social avatar

Give Clojure a go.

It's a modern variant of lisp that runs on the JVM and has deep interoperability with Java, so you can leverage your existing knowledge of Java libraries.

But as it's a lisp, it will have you thinking about problems in a very different way.

abbadon420 ,

Can you name any real world usages for Clojure? I did some lisp once when I was a sprout and loved it, would be awesome to do it on the jvm now that I work with java every day.

losttourist ,
@losttourist@kbin.social avatar

It's a very flexible language so can find a niche almost anywhere. I know of fintech companies that use it extensively for their back end data processing systems, and I've seen some really interesting stuff done with Clojure and Apache Kafka. They're a good fit for each other - Clojure, as a lisp, is optimised for processing infinite lists of things and Kafka topics can be easily conceptualised as an infinite stream of data.

Also, when combined with Clojurescript, it provides a single language that can be used full-stack, so could drop in anywhere that you might otherwise use Node.

But I think one of the best things about it is the way it forces you to re-evaluate your approach to development. It's a completely functional language so you have to throw away any preconceptions about OO and finding new ways to resolve old problems is one of the things that should be a joy for most developers, even if it has no practical application.

maksut ,

IMHO it would fit use cases of java, mostly long running services. But it is a hosted language with different implementations on top of javascript, .net etc. So it might branch out other use cases like frontend dev. It has a small but active community. Although it might be most popular lisp nowadays.

If you are not familiar with lisp and aim is having fun while learning new things then clojure will fit nicely. It is so joyful once you get the initial weirdness because it will feel different. You just fire up a REPL, leave it running in background, hook your ide/editor to it and start sending evals. The application grows while it is running. I find the workflow quiet enjoyable.

TootSweet ,

Go. It’ll be just different enough from what you have experience with to make you think about things differently (in a good way!) from now on. And it’s also a fantastically well-designed language that’s great for getting real work done. And it’s lightning fast as languages go, and compiles to an actual executable. Really a pleasure to work with. It’s my (no pun intended) go-to language for every new project I start. (Excluding what I write specifically for a paycheck. I don’t have a choice there.)

pathief OP ,
@pathief@lemmy.world avatar

Don’t really want to invest in a language designed by Google.

CodeBlooded ,
@CodeBlooded@programming.dev avatar

I’m not crazy about Google’s part in Go, but man, I’ve been using Go a lot and I love it. It feels like a “modern C” that lets you focus on logic instead of memory allocation. I know it violates your requirements, but I’d suggest checking it out anyway! 🤷‍♂️

TootSweet ,

Sorry. I missed that bit in your original post. But I get it.

I started looking into it largely because I have a lot of respect for the individuals (Rob Pike, Ken Thompson, Russ Cox, etc) who created Go, not because Go has anything to do with Google. And because I love everything they have to say about their approach to designing the language. But at the end of the day, it’s true that they’re employed by Google, and after the whole WEI thing, I can’t say I can trust Google at all.

That said, right now I have no specific concerns.

GarytheSnail ,
@GarytheSnail@programming.dev avatar

That’s what’s so great about go. It’s doesn’t take a large investment to learn it.

matcha_addict , (edited )

I have a couple of suggestions based on what you want!

Ocaml: A good intro into functional programming

The languages you’ve used seem to be primarily imperative style. Ocaml is not commonly used in the industry (with some exceptions), but it has a vibrant small community, and more importantly, because it’s a functional language, it will be different enough from what you know. Even if you don’t use it in industry, it will teach you a lot that would be hard to learn using non-functional languages.

Ocaml is a compiled language, with a very fast compiler and very good type system.

Scala: the only semi-mainstream language that blends OOP and proper functional programming well.

Although scala is mostly a functional language, it still has most of the gestures of imperative OOP languages like Java. It is also far more mainstream than ocaml and has used in industry.

Scala also runs in JVM like Java, and thus gives you access to most JVM libraries.

Rust

Intro into low level programming Other answers spoke enough about Rust so I won’t dive here

Zig

similar to Rust in low-levelness, but less mainstream, better C interop, and other interesting differences

Raku: the result of 15 years of programming language design

Raku, formerly perl 6, was almost redesigned from the ground up to resolve complaints of perl 5. It has a very interesting design, with a gradual type system, a blend of functional and OOP paradigms, plus interesting syntax features like sigils and grammars.

There are many interesting languages out there. I could talk forever about this, but I’ll leave you with the above. I personally would recommend ocaml if you’re interested in functional programming or care about performance. Otherwise, Raku, since its very interesting but doesn’t perform well (Raku’s VM is still immature and under development).

msage ,

I’m sorry, but as someone who was paid for Perl 5, I have trouble seeing the appeal for Raku.

The first thing they should have done was nuke Perl from the orbit. Instead they built on top of the magic variable hell.

So no thanks. PHP is much better.

matcha_addict ,

No worries :)

YIj54yALOJxEsY20eU ,

Ocaml is going to be my next learn for fun language forsure! I’m getting sucked into the functional paradigm hole. The option/result types in rust have made working in languages without them much worse.

ericjmorey ,
@ericjmorey@programming.dev avatar

Coming from JavaScript, they may enjoy using ReScript instead of Ocaml.

matcha_addict ,

I tried to give OP languages that would be reasonably different from what they know already, so that its more fun (imo).

However I didn’t know of ReScript, so I gotta check it out.