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

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.

Re:Objective-S: architecture-oriented language based on Smal... by mpweiher on Friday August 12, 2022 @06:42PM (#32444835)
Agreed, and that's kind of where Objective-S started:

https://blog.metaobject.com/2019/12/the-4-stages-of-objectiv...

Re:Objective-S: architecture-oriented language based on Smal... by nightowl_games on Friday August 12, 2022 @11:36PM (#32446668)
Objective-C is powerful yes, but elegant? Not sure. It can do everything but I always felt like it was basically the opposite of elegant.
Re:Objective-S: architecture-oriented language based on Smal... by richarddaystrom on Saturday August 13, 2022 @12:57AM (#32447048)
I would describe it as practical