3 ms·
Coming from the usual languages: pascal, modula-2, objective c, c, lisp, miranda, ruby, python. Another thing I don’t like about Swift are the named parameters
by msie 4y ago
Coming from the usual languages: pascal, modula-2, objective c, c, lisp, miranda, ruby, python. Another thing I don’t like about Swift are the named parameters which was an objective C thing. I find it makes reading code difficult because you don’t start parsing a function call until the first ‘(‘, you have to read the args too to determine which function is being called. I also don’t like the integration of swiftui syntax into swift. Plus you read some of the stuff going on in swift evolution and it seems they are hell bent on adding everything to the language.
- dagmx 4y agoPersonally (and totally subjectively) I’d argue that a lot of those languages you listed are ugly, with the exception of the last two. Some of them are nice looking for short bits but get really ugly for larger pieces of code. Especially when you practice defensive programming and are nested several levels deep because of the lack of optionals. The SwiftUI integration doesn’t materially change the language much. It’s based on passing in blocks as parameters and has been a norm for obj-c as well (effectively how everyone does completion handlers). But I think that’s why language beauty is in the eye of the beholder. To me, Swift allows flatter/cleaner code while defensively programming with lower branching and higher ergonomics. That’s beauty. That’s why guard is so nice. But I can see how it might be off putting if you’re coming from other PL paradigms. I think a lot of it comes down to whether people want simple syntax vs simple code. C for example is simple syntax but rarely ever simple code , Swift and rust are more complex syntax but much simpler code.
- kitsunesoba 4y ago> Another thing I don’t like about Swift are the named parameters which was an objective C thing. Might just be what you're used to, but I find languages without named parameters annoying, particularly when I'm reading code I'm not my own. They do a lot to disambiguate and make reading unfamiliar code much smoother.
- pjmlp 4y agoActually it comes from Smalltalk.
- msie 4y agoYeah that's right but it was introduced in Swift because of legacy Objective-C code.