←back to thread

611 points LorenDB | 1 comments | | HN request time: 0s | source
Show context
choeger ◴[] No.43912866[source]
All this has been known in the PL design community for decades if not half a century by now.

Two things are incredibly frustrating when it comes to safety in software engineering:

1. The arrogance that "practitioners" have against "theorists" (everyone with a PhD in programming languages)

2. The slowness of the adoption of well-tested and thoroughly researched language concepts (think of Haskell type classes, aka, Rust traits)

I like that Rust can pick good concepts and design coherent language from them without inventing its own "pragmatic" solution that breaks horribly in some use cases that some "practitioners" deem "too theoretical."

replies(4): >>43913128 #>>43915349 #>>43916215 #>>43917609 #
Ygg2 ◴[] No.43913128[source]
> I like that Rust can pick good concepts and design coherent language from them without inventing its own "pragmatic" solution that breaks horribly in some use cases that some "practitioners" deem "too theoretical."

I've thought Rust picked some pretty nifty middle ground. On one side, it's not mindfucking unsafe like C. It picked to remove a set of problems like memory safety. On the other side, Rust didn't go for the highest of theoretical grounds. It's not guaranteeing much outside of it, and it also relies a bit on human help (unsafe blocks).

replies(1): >>43913258 #
eptcyka ◴[] No.43913258[source]
As per the article, Rust has benefits beyond the ones afforded by the borrow checker.
replies(1): >>43913710 #
Ygg2 ◴[] No.43913710[source]
Sure, but it is pragmatic in other ways as well :)

It takes ADT, but not function currying, and so on.

replies(2): >>43913760 #>>43913876 #
jeffparsons ◴[] No.43913760[source]
I've occasionally wondered about the lack of currying in Rust; it feels like something that can be done mechanically at compile time, so why not support it? Perhaps to do it cleanly (without more magical privileged functions in core) would require variadic generics?
replies(3): >>43917073 #>>43918247 #>>43922424 #
1. skybrian ◴[] No.43918247[source]
This isn’t Rust-specific, but one reason a language designer might deliberately not implement currying is that it makes function call sites a bit harder to read. You need to already know how many arguments a function takes to make sense of the call’s return type.