3 ms·
Agreed. But once you get some macros (or categories) then Objective-C becomes a great language. Is both elegant and very powerful as it is has the perfect bala
by ardit33 4y ago
Agreed. But once you get some macros (or categories) then Objective-C becomes a great language.
Is both elegant and very powerful as it is has the perfect balance between a static and a dynamic language.
Swift on the other had is a language where wonks decided to throw every silly feature they thought off to the point that is becoming more complex than even Scala.
I wished Swift was just a modernized Objective-C with a normal non bracket syntax and some extra facilities that it was missing.
It is such a wasted opportunity
- nightowl_games 4y agoObjective-C is powerful yes, but elegant? Not sure. It can do everything but I always felt like it was basically the opposite of elegant.
- richarddaystrom 4y agoI would describe it as practical
- mpweiher 4y agoAgreed, and that's kind of where Objective-S started: https://blog.metaobject.com/2019/12/the-4-stages-of-objective-smalltalk.html https://blog.metaobject.com/2019/12/the-4-stages-of-objectiv...
- teakettle42 4y ago> Swift on the other had is a language where wonks decided to throw every silly feature they thought off to the point that is becoming more complex than even Scala. What features in particular do you think represent unjustified complexity? Swift is not my favorite, but I wouldn’t consider it to be a “kitchen-sink” language, and it’s certainly less complicated than Scala.
- astrange 4y ago"guard" is kind of useless but it's minor.
- zapzupnz 4y ago`guard` has its time and place, which is to refactor pyramids of doom away. The number of nested `if let` statements I've seen, and written, is upsetting.
- astrange 4y agoPerl's "unless" syntax, or allowing "if"s at the end of a statement, also solve this and are more flexible.
- zapzupnz 4y agoI don't think they quite address the same thing. `guard` isn't just an `if` statement that looks for the negative of a Boolean; it also forces handing control flow out of scope in a consistent way — you cannot write a `guard` statement without also deciding how you'll exit the scope if the Boolean is false. The developer not being made to do so, and just embedding conditions within conditions, is how the pyramids of doom are constructed to begin with.