87
submitted 10 months ago* (last edited 10 months ago) by pathief@lemmy.world to c/programming@programming.dev

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!!!

top 50 comments
sorted by: hot top controversial new old
[-] chris@lem.cochrun.xyz 57 points 10 months ago

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@lemmy.world 15 points 10 months ago

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

[-] lupec@lemm.ee 21 points 10 months ago

I'll second Rust, it's so fresh and versatile! You can go from super low level stuff all the way to things like web frameworks with WebAssembly and whatnot.

The memory model is definitely a unique beast but I've found it gave me some insight on how it all actually works behind the scenes and I appreciate the strictly enforced correctness too.

load more comments (2 replies)
load more comments (3 replies)
[-] bungle_in_the_jungle@lemmy.world 43 points 10 months ago

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.

[-] henfredemars@infosec.pub 11 points 10 months ago

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

[-] Kushia@lemmy.ml 5 points 10 months ago

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..

[-] notnotmike@programming.dev 8 points 10 months ago

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@lemm.ee 4 points 10 months ago* (last edited 10 months ago)

Hah I love snake case.

I also love python for distributed micro tasks and data pipelining

load more comments (2 replies)
[-] zik@lemmy.world 8 points 10 months ago

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.

load more comments (4 replies)
[-] Lmaydev@programming.dev 25 points 10 months ago

C# is a great choice.

Incredibly versatile language and should be an easy jump from java.

[-] notnotmike@programming.dev 12 points 10 months ago

Agreed, as a Java developer you will hopefully find C# familiar but more refined. They share a lot of the same features now, but C# seems to do them all better, in my opinion. Linq especially is just so much more enjoyable for me than Java Streams.

.NET Core (now just .NET) readily runs on Linux and Visual Studio has a free edition that is superb - an IDE provided by the language developers. Of course, you can always use Visual Studio Code or a third-party offering like Rider (by JetBrains so the transition from Java could be very easy of you are already familiar with their programs).

My only complaint on C# is that the .NET versioning is a little confusing if you aren't already familiar. However, that's only an issue if you work with legacy code. New versions after .NET 5 are all the same naming and upgrading is generally effortless, just changing a single number in your project file and downloading the proper SDK

[-] Socket462@feddit.it 11 points 10 months ago

My two cents: I strongly agree with this. We just deployed an intranet blazor server app running on Linux (don't know which distro) and apache (we might switch to nginx soon). It works very well and we had to write less than 100 lines of JS (mostly for file download and upload) One of my workmates was hired one year ago and at the time he didn't know anything about .Net stack. Now he is mostly autonomous and he loves .Net and blazor in particular. Obviously YMMV.

load more comments (6 replies)
[-] vext01 7 points 10 months ago

I get the impression OP wants to try something new. Java and C# are pretty similar.

[-] Serinus@lemmy.world 7 points 10 months ago

Just don't bring your damn factories over. For some reason Java developers just love unnecessary layers of abstraction and forcing that ridiculous factory pattern.

And they bring it to any language they develop in after Java.

If you see someone saying "no Java developers" for a position, this is why. They've been trained incorrectly, as a joke.

load more comments (3 replies)
load more comments (1 replies)
[-] matcha_addict@lemy.lol 25 points 10 months ago* (last edited 10 months ago)

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).

load more comments (5 replies)
[-] technom@programming.dev 22 points 10 months ago* (last edited 10 months ago)

I can recommend Rust - I'm training a few people on it.

And a pure functional programming language like Haskell or Scheme, if you don't know what functional programming is, or are not comfortable with it. Functional programming needs a different mental approach to traditional (imperative) programming paradigm. Some of the more modern languages like Rust, JS and Python incorporate a lot of functional programming constructs. So it makes sense to learn them.

And a lisp - Common Lisp's popularity is a public secret. Scheme is also fine. This family is homoiconic (program and data are treated more less the same). The syntax is actually very close to its AST. This gives Lisp unparalleled metaprogramming capabilities - mostly through macros. Macros in traditional languages are nowhere near Lisp Macros.

If it interests you, study a stack based language like Forth or Factor. Though they feel very different from Lisps, they have similar underlying properties. And you get more or less the same advantages.

[-] fnmain@programming.dev 7 points 10 months ago

+1 for Rust, the learning curve can be pretty daunting, but once you're over the hump you'll never want to go back

load more comments (4 replies)
[-] modev@programming.dev 15 points 10 months ago* (last edited 10 months ago)

I advise you to learn something different and hard for you. Only this case will help you to grow and realize a lot of new.

  • Rust for hard
  • Nim for something different
  • C for understanding how things work

All these languages are efficient and forget about hype and popularity. Language does not matter if you have what to write with it.

[-] solrize@lemmy.world 14 points 10 months ago

Learnyouahaskell.com is a good way to get started with Haskell. I'd recommend that as best for your mind expansion mission.

[-] jaxxed@lemmy.world 13 points 10 months ago

No jokes: pick a language that is in the market, but has a different design philosophy than your background. Your background includes compiled static, and loose scripting, with strong library tooling, so you have diversity there, so a language in which you have to think differently is the right choice.

I recommend:

  1. Rust if you want something safe but that makes you work differently from java
  2. Go if you want a real mental challenge (the coding approach is very different from java)
  3. Lua if you want really see functional programming as a philosophy
  4. Python if you want scripting, and are tired of the web
[-] BatmanAoD@programming.dev 16 points 10 months ago

Go if you want a real mental challenge

I don't mean to be rude, but I find this baffling; what do you mean by it? One of the primary design goals of Go is to be simple to learn (this is fairly well documented), and it's one of the few things I really have to give the language credit for. Rob Pike has specifically discussed wanting it to be accessible to recent CS graduates who have mostly used Java. I have never heard anyone before describe learning Go as a "challenge."

[-] yetAnotherUser@lemmy.ca 7 points 10 months ago
  1. Lua if you want really see functional programming as a philosophy

I'm pretty sure that Lua doesn't follow functional programming as a philosophy...

[-] losttourist@kbin.social 12 points 10 months ago

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.

load more comments (3 replies)
[-] zygo_histo_morpheus@programming.dev 12 points 10 months ago

Personally, the language that's taught me the most to learn has been Haskell. It has a lot of very interesting ideas and a learning curve that plateaus after most other languages. There are several ideas that have trickled down from Haskell to other parts of the programming world and learning about them in the context Haskell is in my opinion better because you'll learn about them in a context where they fit in with the rest of the language very well instead of being late additions that offer an alternate way of doing things.

Coming from Java and JS, Haskell has a very different approach to a lot of things so you'll have to re-learn a lot before you get productive in it. This can be frustrating for some but you'll learn more if you get over that hump on the other hand.

Haskell doesn't see very much industry use and arguably isn't very well suited for industrial application (I haven't used it professionally so I don't know personally) so it might not directly help you land any new jobs but it is in my opinion it's a very good way to develop as a programmer.

[-] dneaves@lemmy.world 11 points 10 months ago* (last edited 10 months ago)

Elm

In short, it's ruined my expectations of languages. It's a functional language, like the style of Haskell, and transpiles to html or js (its meant for web). There's very little that it allows for going wrong, and for things that could fail, it either tells you to port that out to JS and bring it back when you're done, or you have to handle a Result type or Maybe type.

It sounds strict, yes, but not having to deal with issues later is so nice.

load more comments (1 replies)
[-] demesisx@infosec.pub 11 points 10 months ago* (last edited 10 months ago)

I’m a huge fan of Haskell and (for pragmatic purposes) Purescript. Purescript is hard to find much in the way of documentation but it is so similar to Haskell in that the steep learning curve is worth it, IMO. I rarely find a project that I couldn’t accomplish with one or the other or both.

load more comments (3 replies)
[-] liliumstar@lemmy.dbzer0.com 11 points 10 months ago

I would suggest Nim, I had a blast learning it and making a small project. It is not a mainstream language, nor is it a joke language.

https://nim-lang.org/

[-] cosmicrose@lemmy.world 10 points 10 months ago

I’ll suggest Elixir. It’s a language that runs on the same virtual machine as Erlang, which has proven to be great for ultra-reliable and excellent at managing many, MANY concurrent processes.

Elixir itself builds upon this great foundation with a syntax similar to Ruby, but entirely functional. It’s a delightful language to read and write.

[-] wer2@lemm.ee 10 points 10 months ago

C or C++, specifically with the use of compiler explorer so you can get a feel for how code actually runs.

Common Lisp or Haskell to get a taste of something really different.

[-] joelthelion@lemmy.world 10 points 10 months ago

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.

[-] pathief@lemmy.world 6 points 10 months ago

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!

load more comments (2 replies)
[-] Asudox@lemmy.world 8 points 10 months ago* (last edited 10 months ago)

I recently picked up Rust, still a beginner, but it's very nice. And the compiler errors and tips are top. Since I used only Python before, Rust is my first compiled language and I'm glad it was Rust. Options and Result's are also something I appreciate tbh. Other than for AI, simple stuff and maybe prototypes, I would use Rust over Python. Definitely recommend it. The borrow checker is a pain in the ass though. I'll also be using it later for embedded systems when I become more fluent with it. I am also currently making a big project with Rust that I haven't been able to do with Python.

[-] Floshie@lemmy.blahaj.zone 8 points 10 months ago

Kotlin is by far my fav language. I've been astonished by its capabilities used with the "Exposed" library

load more comments (1 replies)
[-] Kolanaki@yiffit.net 8 points 10 months ago

How about COB-

No joke languages.

Oh...

load more comments (2 replies)
[-] coffee_poops@sh.itjust.works 8 points 10 months ago
[-] mindbleach@sh.itjust.works 8 points 10 months ago

C. Plain old low-level "portable assembly" C.

In particular I'd recommend a Game Boy game, because GBDK uses SDCC and is fairly low-bullshit. With scanline interrupts, you have a surprising amount of time to do clever visual effects, flexing the machines one-and-a-half background layers. The machine is sufficiently explained in about forty-five minutes via the Ultimate Game Boy Talk.

(NES is also an option, but - don't. I say this with my NES homebrew project open in the other monitor. It's a miracle this thing ever caught on. You need a decent understanding of the hardware, C, and 6502 assembly, just to put stuff onscreen efficiently. And then the fillrate still blows. The Game Boy can blast the whole tilemap in a fraction of a frame if you cheat hard enough.)

If you want more power, the GBA supports C and C++, and that little fucker runs Doom. It's intended as a super-flexible sprites-and-tilemaps affair, like an SNES with an upgraded graphics chip. (And a downgraded sound chip.) You can scale and rotate dozens of sprites at 60 Hz, atop two scaled-and-rotated backgrounds. Or use fullscreen bitmaps in 8-bit or 16-bit color. (Well, 15-bit.) The homebrew scene for the GBA started before the console even launched, because it has a pretty standard ARM chip and will do anything the Genesis could without breaking a sweat. There was nearly a voxel heightmap version of Banjo Pilot that looked pretty damn close to Diddy Kong Racing on N64.

I recommend C and retro consoles because they're suited to one another - and they offer control. You are in command of every single byte on these machines. C is the ideal language for that. It offers familiar high-level structures. It supports familiar syntax. But it runs very close to the metal, and if you want to get even closer, it will let you.

load more comments (1 replies)
[-] Fades@lemmy.world 7 points 10 months ago

C++, or if you want to lean towards a more modern lang, C#. Kotlin is also a lot of fun

load more comments (1 replies)
[-] huginn@feddit.it 6 points 10 months ago

Kotlin is the language to beat imo. Very expressive and full interop with Java. Structured concurrency so multithreading Is a breeze. Build mobile apps easily with it for Android (and in theory iOS but that's still alpha). Desktop apps too!

[-] Baccata@lemmy.world 6 points 10 months ago

Scala can also be compiled to JavaScript with really good interop with JS libraries, and to native with decent interop with C

[-] vext01 6 points 10 months ago

Prolog.

It will free your mind.

[-] bizdelnick@lemmy.ml 5 points 10 months ago
[-] mdhughes@lemmy.ml 5 points 10 months ago

Scheme, and work through SICP, watch the lectures along with the reading.

I prefer Chez Scheme but there's many implementations. Chez's fast and practical, C FFI, large standard library, nice REPL with editor.

[-] BiggestBulb@kbin.run 5 points 10 months ago

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.

load more comments (3 replies)
load more comments
view more: next ›
this post was submitted on 26 Jan 2024
87 points (92.2% liked)

Programming

17620 readers
159 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS