News for hackers. Stuff that matters.
Re:Swift – observations from Rust’s original designer by knocte on Tuesday June 03, 2014 @04:39AM (#7838759)
Couple of things that are still not clear to me, even when people keep saying that it's similar to C#:

- How about Garbage Collection?

- Many mentions to "type inference", is it then a statically-typed language? Or is it hybrid?

Re:Swift – observations from Rust’s original designer by krig on Tuesday June 03, 2014 @06:09AM (#7839119)
- Garbage Collection is handled via reference counting and ARC. No automatic cycle detection, the programmer has to manually track and resolve reference cycles. Same as using ARC in Objective C.

- It is a statically typed language. Type inference is the same mechanism as is used in C++11 with the auto keyword. Basically, anywhere the compiler can "guess" the type, you don't have to be explicit about it. Unless you want the variable to have a different type from the inferred type, that is.