I'm from South Africa - I have a pet zebra named Spotty.
Spotty loves Objective-C and is trying to ignore Swift. Spotty's friend is Hanjo Besastian, a goose and no distant relative of Alfred J. Kwak. As Beef Stiko said, I link what I like
- Want to see a calibrated nonlinear equation solver with a constraint in less than 10 lines of code? https://stackoverflow.com/questions/64498972/how-to-get-xy-value-from-ct-in-philips-hue/64509345#64509345
- FFT anybody? https://stackoverflow.com/questions/63103407/audio-detector-work-on-device-but-not-on-simulator-and-accuracy
Why do I like Objective-C so much? I've wondered myself ... probably because I'm so old ... did you enjoy that?
After 20 years of hard core Java I want to be close to the metal again. 30 years ago I used C and could do anything with a void pointer. Brilliant! Then C++ happened - yuck. In stead of building on faithfuls such as printf it reinvented the wheel with cout / cin. In those days, if you dared to be cool and use cout / cin you'd be punished as soon as a new compiler was released.
Make no mistake, C++'s OO was needed to move the world from REPL to event driven paradigms as it moved from the console to the GUI. But by the time STL etc happened I had moved on.
I've solved a lot of problems with some mini language with its own command set such as init or calc or whatever the solution required. Web APIs also exploit this concept, but Objective-C's messaging paradigm allows you to program that way.
Now the best thing about Java is that it takes care of malloc / free for you but with ARC you get that in Objective-C.
So what about Swift? Well, it's like your first grade teacher. As with C++'s strong types, the compiler keeps on telling you how to code. Worse - it is not even white space insensitive!
One of C's most powerful concepts, that of NULL, is thrown away. Everybody understands
if ( x )
but suddenly this becomes illegal. Even in Java it was annoying that you had to
if ( x != 0 )
let a = 10;
because, if you don't specify a type, you end up doing it mentally anyhow and feeling uneasy until a goes out of scope. Objective-C finds a good balance between all of these.
Nowadays the compiler will complain if you do
if ( a || b && c )
yet it will allow you to
x = a + b * c;
Again, seriously, why?
Yet Swift, in the name of safety, takes this pettyness to another level.
Oh well, once I've fully mastered Swift I'd probably be more forgiving, as it really is not that bad, but optionals?! Seriously!!?!?!
Member for 11 months
1 profile view
Last seen Jul 26 '20 at 17:42