this post was submitted on 26 Jan 2024
87 points (92.2% liked)

Programming

17314 readers
194 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 1 year ago
MODERATORS
 

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

you are viewing a single comment's thread
view the rest of the comments
[–] Lmaydev@programming.dev 24 points 9 months ago (5 children)

C# is a great choice.

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

[–] notnotmike@programming.dev 12 points 9 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 9 months ago (1 children)

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.

[–] scarilog@lemmy.world 1 points 9 months ago (1 children)

Bundle size is my only complaint with blazor, has to send the .net runtime in webassembly to the client.

Aside from this, C# on the browser is an absolute joy to use. I'd use for everything if I could.

[–] Socket462@feddit.it 4 points 9 months ago (1 children)

You are talking about Blazor webassembly, I am talking about Blazor server side, which loads as fast as a "normal" website.

Server side Blazor has other caveats, that's why I specified it is an intranet project, where server side Blazor fits very well. Anyway, at the moment, Microsoft is still putting effort in polishing both type of Blazor hosting model.

This is not our first Blazor intranet web app and some of them are running in production for one year more or less.

It is really a joy to program using Blazor, especially if you need cross tab/browsers/device/user real time communication, which comes almost free thanks to underlying SignalR channel.

[–] scarilog@lemmy.world -3 points 9 months ago* (last edited 9 months ago) (2 children)

Ah you mean Razor then. Blazor lets you run C# in the browser, but Razor is the one that needs a server and streams changes to the client using signalR.

[–] Socket462@feddit.it 4 points 9 months ago* (last edited 9 months ago) (1 children)

I know Microsoft didn't get this right with naming and you got caught in the trap but there are 2 (actually 3) ways of hosting Blazor.

I also see that this confusion won't help OP choose Blazor over some more coherent dev environment hehehehe

[–] scarilog@lemmy.world 2 points 9 months ago

Sorry, that's my bad, I was under the impression that Blazor and Razor were two distinct ways of doing things. Thanks for that link, it was very helpful.

[–] asyncrosaurus@programming.dev 4 points 9 months ago

Razor

Razor is the templating engine that's been there since the original MVC. Blazor Server is the one that needs a server and streams changes to the client using signalR. Blazor WASM is the one that uses Web Assembly. As of .Net 8, Blazor can now also ne used as a generic SSR backend. They all use Razor Components, which is a component model using the Razor engine.

Not to be confused with Razor Pages, which is also a generic SSR backend.

[–] Serinus@lemmy.world 7 points 9 months ago (1 children)

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.

[–] Corngood@lemmy.ml -5 points 9 months ago (1 children)

All the core parts of dotnet (e.g. roslyn) seem to be built that way. I find them very frustrating to work on. Between that and the whole nuget thing being somewhat FOSS unfriendly, I'd steer people away from C#.

[–] Serinus@lemmy.world 6 points 9 months ago (1 children)

I don't get how NuGet is FOSS unfriendly. I mean, at worst you could set up your own repository. All the tools are local. It wouldn't be difficult to set up your own source if that was absolutely necessary.

[–] Corngood@lemmy.ml -1 points 9 months ago

The whole thing is built around pulling binary packages from servers, and there's no consistent way of building those things from source.

It's extremely difficult to package anything non-trivial without referencing those binary blobs.

They had to build this whole custom thing (https://github.com/dotnet/dotnet) just to make the SDK itself buildable from source, and most releases still have some binary dependencies. They only did it for the SDK so it could be packaged in Debian, etc.

[–] vext01@lemmy.sdf.org 7 points 9 months ago

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

[–] pathief@lemmy.world 2 points 9 months ago

In my previous company we had a dot net + Microsoft SQL server stack. The code base was admittedly really really bad but those .NET Web Forms were horrendous to work with. C# in general felt very close to Java at the time, except for the LINQ queries I guess.

I'm sure that, like PHP, the technology has come a long way and things are better and more modern right now. This was before Nugget was even a thing! Regardless, I feel like those chapters in my life are finished. I'd rather try something actually new to me!