| ▲ | nicoburns 2 hours ago | ||||||||||||||||
> Inside Swift is a slim language waiting to get out... and that slim language is just a safer Objective C. Rust? Rust is basically a simpler Swift. The objective-c bindings are really nice too, and when you're working with obj-c you don't have have worry about lifetimes too much, because you can lean on the objective-c runtime's reference counting. I think the way to think about it is that with Rust, it's as if all the goodness in Swift was implemented with in the "C" level, and the Objective-C but is still just library-level a runtime layer on top. Whereas Swift brings it's own runtime which greatly complicates things. | |||||||||||||||||
| ▲ | gbanfalvi 2 hours ago | parent | next [-] | ||||||||||||||||
I would absolutely not call Rust a simpler Swift. Swift doesn't have and ownership/borrowing system, explicit lifetime for objects, much more expressive (and therefore complex) macro support... I get that there's a tradeoff. Rust requires you to be way more explicit about what you're intending upfront and that can, in the long term, lead to simpler code -- but there's no dimension (depth-wise or breadth-wise) that I'd call Rust simpler. | |||||||||||||||||
| |||||||||||||||||
| ▲ | lenkite an hour ago | parent | prev | next [-] | ||||||||||||||||
Rust is still more complicated than Swift, but you needn't worry - the Swift team is flexing their muscles hard to ensure that Swift becomes the biggest, most complicated language on Earth and wins the complexity, cognitive burden and snail performance once and for all eternity. Their compiler already times out on the language, soon even an M7 will also give up. | |||||||||||||||||
| ▲ | estebank 2 hours ago | parent | prev | next [-] | ||||||||||||||||
One of my recurring language design hot takes is that it's easier to design for speed and then make it easy to use than it is to make it easy to use and then try to speed it up. | |||||||||||||||||
| |||||||||||||||||
| ▲ | zer0zzz 2 hours ago | parent | prev [-] | ||||||||||||||||
Except the entire design of swift is meant to make everything more automated. * automated exclusivity with value types and value witness tables, classes as arc types (ie Arc<Mutex<T>>) * automated interop with C/C++/Obj-C through the clang ast importer Maybe they could have started with rust and added on what they needed, but why not build a new language at that point where things so fundamental are involved? Source: I worked in lattners org at the time of swifts inception (on an unrelated backend) but that was the motivation. I also worked on the swift compiler for a little bit some years later on in my career. | |||||||||||||||||