2 ms·
Last time I checked out Swift, I ran into some annoying issues with type erasure and generic protocols (similar to the issues Java has, where one class can't be
by jasonhansel 8y ago
Last time I checked out Swift, I ran into some annoying issues with type erasure and generic protocols (similar to the issues Java has, where one class can't be both Iterable<Integer> and Iterable<String>).
I also find Swift's "inout" params deeply confusing (especially when aliasing is involved), and I wish it made dynamic dispatch more explicit (like Rust).
- millstone 8y agoWhat would e.g. `view.superview` look like in Rust though? That seems to be the main sticking point. In UI programming it is common to walk up, down, and around the view hierarchy.
- jasonhansel 8y agoI actually think that allowing this sort of traversal is usually a bad thing, but it can always be solved with Rc<T> and Weak<T> in Rust.