4 ms·
Swift passes the test in my view provided you can cope with using the word struct instead of object. (Objects based on classes are reference types in Swift but
by josephlord 12y ago
Swift passes the test in my view provided you can cope with using the word struct instead of object. (Objects based on classes are reference types in Swift but structs, enums and the default collections are value types).
You can write pretty functional code if you want but you also have the option to write more mutable/side effecty/stateful object code if you want.
- jdpage 12y agoSo does Rust, I think. 2014 was a good year for programming languages.
- klibertp 12y ago> 2014 was a good year for programming languages Yeah... another batch of innovative, interesting languages died because "it's not practical", another pile of language features didn't manage to get implemented because "but look at syntax, it's ugly", another bunch of languages took some decades old features, dumbed them down as much as possible and then some more (because "it would be to hard to use otherwise") and marketed them as ground-breaking improvements to the art of programming. Very good year for PLs, indeed.
- matthewmacleod 12y agoHave you got any concrete examples, or are you just going to complain? The entire field of programming language design is more complex than you seem to be admitting.
- tormeh 12y agoNice syntax and easily explained features are extremely important parts of programming language design. A really fancy new feature whose implementation compromises these qualities is usually a step backwards for the language as a whole. Look at C++.
- tel 12y agoLast I checked you can't quite get away with using struct only in Swift because you need objects for indirection in recursive structs. But other than that I really, really hope that struct-only coding takes over in Swift given time... perhaps lots of time.
- josephlord 12y agoFair point the need to Box things is a bit of a nuisance. Also staying pure and immutable gets tricky as soon as you hit the Cocoa APIs but it is definitely a step in the correct direction and I still like it.