News for hackers. Stuff that matters.
Re:Rust Is Surprisingly Good as a Server Language by Cthulhu_ on Monday July 13, 2020 @03:19AM (#23817959)
Rewriting is very expensive, and the advocate will need to make a VERY strong case for Rust if they're asking your company to invest in replacing it - and alternatives have to be suggested as well, including other languages and a good list of things wrong with Node / TS. Consider developer availability as well.

I don't think a strong enough argument can be made. I'm sure you CAN write web services in Rust, and that in very specific cases it'll have some benefits over Node, but honestly very few people work in an area like that.

Disclaimer: I've settled on using Go to rewrite an existing application. The original app was written in PHP; nothing wrong with PHP per se, but the existing codebase is a mess and the PHP version is hard to keep up to date because of LTS versions of operating systems + very slow and careful updates at our customers (it's network infrastructure). For me, switching to a compiled language that produces a self-contained executable was a compelling argument. I have to admit that I do kinda pine for something like Java again though.

Re:Rust Is Surprisingly Good as a Server Language by tabs_masterrace on Monday July 13, 2020 @06:29AM (#23819202)
Swift / Vapor is amazing as well. They just released version 4, which streamlined and tidied up lots of things, can't recommend it enough. There's just something solid about Swift's strictness and compile time checks, that make it easy to be sure you're handling all possible code paths, and you can be reasonable confident it works and won't break all the time. Also very lean on dependencies, mostly unopinionated, and performance/mem-usage is top tier too. Only con is probably, you're bound to Xcode (and therefore macOS) for development, I guess you could try to set it up in VSCode, but haven't heard of it and experience will probably be not so good.
Re:Rust Is Surprisingly Good as a Server Language by dpacmittal on Monday July 13, 2020 @06:55AM (#23819359)
That con is a pretty big one. Macs have less than 10% desktop market share.
Re:Rust Is Surprisingly Good as a Server Language by gganley on Monday July 13, 2020 @08:36AM (#23820067)
In this case Swift is being used on the server, so that could be an officially supported platform[0] which if I recall correctly is macOS, Ubuntu, CentOS, Amazon Linux 2, and Windows as of Swift 5.3.
Re:Rust Is Surprisingly Good as a Server Language by pjmlp on Monday July 13, 2020 @11:22AM (#23821714)
Swift on Linux is pretty much WIP, with an ecosystem that is Mac first and hardly considers another platforms.

On Windows with luck 5.3 will be the first version that the compiler actually works, let alone existing libraries that barely work on Linux.

Re:Rust Is Surprisingly Good as a Server Language by save_ferris on Monday July 13, 2020 @07:27AM (#23819556)
Why does this matter? It’s a server, not a desktop application.
Re:Rust Is Surprisingly Good as a Server Language by azangru on Monday July 13, 2020 @08:43AM (#23820133)
> you're bound to Xcode (and therefore macOS) for development

I would prefer languages that don't dictate what hardware/software to use for writing them.

Re:Rust Is Surprisingly Good as a Server Language by save_ferris on Monday July 13, 2020 @08:51AM (#23820194)
I get that, but it still doesn't explain why the above poster used the MacOS market share as a detractor in this case. If you value languages that don't dictate hardware/software for you, then Apple was probably never a serious contender for you.
Re:Rust Is Surprisingly Good as a Server Language by Nican on Monday July 13, 2020 @03:28AM (#23818037)
Yeah. I am being very cautious about their desires. I learned that the best way to discourage someone from taking a large project is to show how much work it would be. Just shutting down developers is not nice.
Re:Rust Is Surprisingly Good as a Server Language by nazka on Tuesday July 14, 2020 @07:20AM (#23830601)
I agree too. Rewrites are a scary thing. The best is to do some test with a few new micro services and see how it feel to code from 0 to production. Learning the tool chain etc..
Re:Rust Is Surprisingly Good as a Server Language by philosopher1234 on Monday July 13, 2020 @04:25AM (#23818457)
What do you miss about java?
Re:Rust Is Surprisingly Good as a Server Language by tomerbd on Monday July 13, 2020 @04:27AM (#23818471)
The ecosystem, i.e. Spring.
Re:Rust Is Surprisingly Good as a Server Language by emerongi on Monday July 13, 2020 @05:47AM (#23818967)
Oof, there are people out there that like to work with Spring?

The over-engineering in the Java ecosystem has wasted more of my time than saved it.

Re:Rust Is Surprisingly Good as a Server Language by pjmlp on Monday July 13, 2020 @11:27AM (#23821760)
Yes, although on my case it is JEE actually.

That over-engineering is what save us from clunky solutions that are good for hello world applications and HN like posts, but fail when doing deployments across heterogeneous platforms on Fortune 500 IT departments with endless number of external contractors and technology stacks hardly seen elsewhere.

And if I have to pick between managing WebSphere containers and taking care of k8s, I will rather pick WebSphere.

Re:Rust Is Surprisingly Good as a Server Language by The_rationalist on Monday July 13, 2020 @07:12AM (#23819453)
The learning curve should be beaten after a few weeks and is definitely lower than learning rust. On the other hand, the productivity and expressiveness return on investment is huge. Spring is arguably the state of the art framework on the server and is integrated with so many powerful technologies.
Re:Rust Is Surprisingly Good as a Server Language by wtetzner on Monday July 13, 2020 @11:04AM (#23821496)
> On the other hand, the productivity and expressiveness return on investment is huge. Spring is arguably the state of the art framework on the server and is integrated with so many powerful technologies.

Having worked with Spring for years (and still working with it, unfortunately), I have found exactly the opposite.

It does way too much dynamically, making debugging hard and rendering the type-system almost useless.

Sure, it comes with a lot of libraries for handling a large varieties of tasks, but they all seem to be half-assed, and much of the time I either have to work around their limitations or write something myself anyway.

I really don't see why the same thing couldn't have been achieved by writing a bunch of useful libraries that don't depend on a dependency injection framework (which I also don't find much value in).

Finally, it takes forever to startup, making testing a pain. It even means that JUnit tests are slow.

Re:Rust Is Surprisingly Good as a Server Language by im3w1l on Monday July 13, 2020 @07:13AM (#23819471)
I have not used spring and only ever seen hate for it. Would be nice to read a pro-spring article or similar.
Re:Rust Is Surprisingly Good as a Server Language by deleuze on Monday July 13, 2020 @10:24AM (#23821074)
It's like any framework: once you learn it's idioms, you can be insanely productive. Unlike other frameworks, enterprise Java is all about flexibility, so in Spring land, it's often in incredible easy to tune or replace lower level components like connection pools, etc.

As such, I'd describe it as a good combination of highly dynamic architecture with lots of manual control. Of course, all of this is enabled with copious amounts of magic, which is usually why people don't like Spring.

Re:Rust Is Surprisingly Good as a Server Language by antihero on Monday July 13, 2020 @05:39AM (#23818915)
Why not Kotlin?
Re:Rust Is Surprisingly Good as a Server Language by tekknik on Tuesday July 14, 2020 @08:44AM (#23831184)
Because we need the JVM to die?
Re:Rust Is Surprisingly Good as a Server Language by antihero on Friday July 24, 2020 @04:04AM (#23936931)
Why do we need the JVM to die?