HackerTrans
TopNewTrendsCommentsPastAskShowJobs

drewcrawford

no profile record

comments

drewcrawford
·vor 11 Jahren·discuss
Swift is not garbage collected in the slightest. ARC is not garbage collection.

http://sealedabstract.com/wp-content/uploads/2013/05/Screen-...

Once upon a time Objective-C had a real garbage collector but that temporary interlude has not, nor ever will be supported from Swift.

Finally, Swift objects (can be, as compiler decides) laid out on the stack, so unless you have some super sweet stack garbage collection technology you'd like to share with us, they aren't garbage collected.

In any case, I don't see what garbage collection has to do with safety or the borrow checker.

> I don't understand "you just promise the compiler that it's safe"

Perhaps you'd like to read the Rust Book:

> When a type T implements Sync, it indicates to the compiler that something of this type has no possibility of introducing memory unsafety when used from multiple threads concurrently.

I think "you just promise the compiler that it's safe" is an accurate summary of that feature.

> We have been measuring developer cost all along, by writing hundreds of thousands of lines of code in the language as we've been developing it: the Rust compiler is written in Rust, and we've been developing Servo as well.

Would you be satisfied if you wrote a language that is productive only for language designers writing web browsers and compilers? Because that is all your measurements prove.

I'm telling you, as an intermediate Rust developer doing neither of those things, that I am not sure if I am more productive in Rust or C. Rust is certainly safer, but I am not convinced that safety is worth returning to C-like productivity. Performance is, but I can achieve good performance in Swift.

Rust assumes that I value performance and safety equally; e.g. that I am willing to give up productivity for either one. In reality I am only willing to give up productivity for performance. There are some low-hanging safety fruit that I want (like optionals) but the higher-cost fruit like multithread safety I don't want. I think those features are Bad (TM).
drewcrawford
·vor 11 Jahren·discuss
I think the question is "what is the cost" of the more novel rust safety features? In my experience, the cost is pretty high.

When you set Rust next to, e.g. swift, swift is phenominally more productive and similarly performant. And it is also quite safe (relative to C) without having all of the Rust safety features that make me want to kill the borrow checker with a rusty spoon.

I really wish Rust walked back on the more esoteric forms of safety (like thread safety, which you can't really verify anyway, you just promise the compiler that it's safe) and it tried to drive a bargain like Swift.

Rust really isn't satisfied to adopt the safety features that are "fairly low effort", it wants to break new ground without really measuring developer cost (hard to do since it's not widely used). That's really my issue with it.
drewcrawford
·vor 12 Jahren·discuss
You know what else loses developers? Shutting down the project.