News for hackers. Stuff that matters.
Re:Objective-S: architecture-oriented language based on Smal... by teakettle42 on Friday August 12, 2022 @07:22PM (#32445150)
> 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.

Re:Objective-S: architecture-oriented language based on Smal... by astrange on Friday August 12, 2022 @10:50PM (#32446485)
"guard" is kind of useless but it's minor.
Re:Objective-S: architecture-oriented language based on Smal... by zapzupnz on Friday August 12, 2022 @11:05PM (#32446526)
`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.
Re:Objective-S: architecture-oriented language based on Smal... by astrange on Saturday August 13, 2022 @01:22AM (#32447168)
Perl's "unless" syntax, or allowing "if"s at the end of a statement, also solve this and are more flexible.
Re:Objective-S: architecture-oriented language based on Smal... by zapzupnz on Sunday August 14, 2022 @06:23AM (#32458087)
I 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.