|
|
|
|
|
by hgs3
422 days ago
|
|
It's a shame that Objective-C never really caught on outside of the NeXT/Apple ecosystem. User interfaces benefit greatly from dynamism, and all the UI toolkits I've used for C and C++ try to emulate message passing in one way or another: from WinAPI's SendMessage, to GTK and Qt's signals and slots. I'm surprised the wider FOSS community didn't adopt the language. I've been building a GTK4 app recently, and the macro-heavy class boilerplate, C-style casting everywhere, and custom signaling mechanisms would all be far cleaner in Objective-C. It's easy to imagine glib and GTK as what could have been a FOSS parallel to Core Foundation and Cocoa. If you like C, then Objective-C is definitely worth a look. You don't need a Mac to try it either [1]. [1] https://github.com/gnustep/libobjc2 |
|
I'm not sure. I've written so much GUI code over several decades, and I think dynamism is only slightly helpful. I've been writing a new GUI in TS (not at all ready for publicity yet) that aims to rethink GUIs from the ground up as if the 80s and 90s never happened, but with the benefit of hindsight, much like Go did with C. I've been meaning to do a proper write up on some of the innovations I think are genuine improvemenets over the status quo. I should probably do one at a time and start today instead of waiting until release like I planned. But in my GUI, dynamism is only needed in maybe one or two core places. I'm not sure it makes any use of the fact that JS has string keys (equiv of objc_msgSend/etc), and can probably be written in boringish C++ just fine, or maybe even boringish Go, although op overloading would clean up one or two APIs really nicely.