Re:Objective-S: architecture-oriented language based on Smal...
by Xeoncross on Friday August 12, 2022 @07:00PM
(#32444970)
I must be missing something here.
[ Parent
| on HN ]
Re:Objective-S: architecture-oriented language based on Smal...
by tialaramex on Friday August 12, 2022 @08:44PM
(#32445727)
While this syntax is indeed popular in several languages it's deeply weird, it's like how English uses apostrophe S to do two very different things at the end of words.
The Add operation has a whole bunch of properties and this not only isn't most of them, it's arguably not any of them, the main argument for + as a string concatenate operator is "Well, people seem to like it". Which, I guess I/O streams doesn't even have that going for it, but it's a pretty terrible rationale.
Look, just grow string interpolate and write f"{foo}{bar}" or whatever as much as you like don't abuse unrelated operators.
Re:Objective-S: architecture-oriented language based on Smal...
by lolinder on Friday August 12, 2022 @10:47PM
(#32446471)
Whatever you feel about operator overloading, it's way better than the Objective-C version, even the version floated by the defenders. String interpolation is even better, sure, but the + alternative isn't that bad. As you noted, natural language does the same kind of overloading and we seem to cope with it just fine.
Re:Objective-S: architecture-oriented language based on Smal...
by ranger_danger on Friday August 12, 2022 @08:07PM
(#32445464)
It's more like compile-time concatening of literals like in C when doing
const char *s = "foo" "bar";