4 ms·
Just curious, but would it have been feasible to update the Objective-C compiler to reduce these pain points? Or was there issue more intrinsic to the design o
by ab5tract 1y ago
Just curious, but would it have been feasible to update the Objective-C compiler to reduce these pain points?
Or was there issue more intrinsic to the design of the language itself?
- cosmic_cheese 1y agoWith the caveat that I’m not all that knowledgeable about compilers, as I understand it, no not really. The compiler’s “reasoning” about types is extremely rudimentary and is easy to “deceive” because like a C compiler, it trusts that the dev knows what they’re doing. This can enable an experienced vet to move quickly due to low resistance, but makes the occasional slipups that even vets commit easy to miss. You’d basically need to implement the Swift compiler in the Objective-C compiler to get similar type safety, but to make it work you would probably need to change various bits of syntax, drop inline intermixture of C and C++, and remove a lot of Obj-C’s dynamism, basically making it a new language. That’s why Swift was created, and in the past Obj-C’s bracketed smalltalk-like syntax had proven unpopular amongst newcoming devs, so they chose a more mainstream syntax instead.
- ab5tract 1y agoThanks for this! More or less what I expected, just wanted to be sure.