←back to thread

Eurydice: a Rust to C compiler

(jonathan.protzenko.fr)
185 points todsacerdoti | 2 comments | | HN request time: 0.001s | source
Show context
apitman ◴[] No.46179418[source]
I use Rust and C at work. I quite enjoy Rust, but I currently have no reason to believe C won't outlive it, by a lot.
replies(8): >>46179466 #>>46179713 #>>46179716 #>>46179780 #>>46180057 #>>46180446 #>>46183271 #>>46183498 #
mustache_kimono ◴[] No.46179780[source]
> I currently have no reason to believe C won't outlive it, by a lot.

My reaction is kind of: "So what?" I really don't care about the relative lives of languages and don't really understand why anyone would. Unless I am wrong, there is still lots of COBOL we wish wasn't COBOL? And that reality doesn't sound like a celebration of COBOL?

IMHO it would be completely amazing if magically something 10x better than Rust came along tomorrow, and I'd bet most Rust people would agree. Death should be welcomed after a well lived life.

To me, the more interesting question is -- what if efforts like c2rust, Eurydice, TRACTOR and/or LLMs make translations more automatic and idiomatic? Maybe C will exist, but no one will be "writing" C in 20 years? Perhaps C persists like the COBOL zombie? Perhaps this zombification is a fate worse than death? Perhaps C becomes like Latin. Something students loath and are completely bored with, but are forced to learn simply as the ancient interface language for the next millennia.

Is that winning? I'd much rather people were excited about tech/a language/a business/vibrant community, than, whatever it is, simply persisted, and sometimes I wish certain C people could see that.

replies(7): >>46179997 #>>46180024 #>>46180421 #>>46180840 #>>46181102 #>>46183027 #>>46184629 #
tormeh ◴[] No.46179997[source]
Honestly I'd be a bit disappointed if something better came along tomorrow. Just as we as an industry spent all this effort moving to Rust something better comes along? Lame. Obviously I want better languages to come out, but I'd either want a bit of warning or a slower pace so we as an industry don't totally "waste" tons of time on transitioning between short-lived languages. Thankfully languages need about 10 years to mature from 0.1 to production readiness, and industry happily ignores marginally (and moderately) better languages than what they're using, so this is not a realistic issue.
replies(2): >>46180065 #>>46184180 #
1. mustache_kimono ◴[] No.46180065{3}[source]
> Honestly I'd be a bit disappointed if something better came along tomorrow.

You'd be disappointed if something 10x better came along tomorrow? I suppose you would you also be disappointed if magically we had economical fusion power, because you own utility stocks? Or we invented 10x better new car, because you already own an old car?

Of course the world wouldn't immediately move to one thing or the other, etc., and we'd still have a 10x better thing?

> Obviously I want better languages to come out, but I'd either want a bit of warning or a slower pace

The purpose of this thought experiment is to say -- it's perfectly fine for things to live and die, if they must. We've had a second Cambrian period for PLs. It's perfectly alright if some don't live forever, including Rust, which I really like.

In my thought experiment, Rust and C could also accept this new paradigm, and adapt, and perhaps become 10x better themselves. Though this is something heretofore C/C++ haven't done very well. IMHO new things don't preclude old things, and there mustn't be only one winner.

> Thankfully languages need about 10 years to mature from 0.1 to production readiness, and industry happily ignores marginally (and moderately) better languages

Which my thought experiment did as well? Read: This is a 10x improvement!

replies(1): >>46180415 #
2. tormeh ◴[] No.46180415[source]
Oops, skipped the 10x part. If it's really 10x better that would indeed be amazing. That's basically the leap from C to Rust in domains that C is not good at.