Objective-C is conceptually similar to BOOPSI – it’s generally an add-on to the C programming language. In both Obj-C and BOOPSI calling a method implies calling a dispatcher function that resolves the actual method to call and invokes it. With the addition of reference counting to BOOPSI in MorphOS, both follow the same memory management principles.
The main difference comes from the fact that BOOPSI classes need to be manually created with functions being manually assigned their IDs and let’s not even start on the extra hassle of having to write the code for the dispatchers. This made programmers reluctant to add new classes in their applications, in turn making the overall code less object oriented.
Meanwhile, the MorphOS team has also released an early beta of the operating system’s future default email client, Iris. It uses many of the new features introduced in MorphOS 3.10, and support IMAP, OAth2 for Gmail and Outlook, and much more.
Can I just say I really wish they had put their effort into Swift (or you know almost anything else) instead.
There was a lot to love about Objective-C back in the 80s and early 90s, but then Java (and others) came along and the weaknesses of Obj-C became glaring (at least to me). Not the least of which is separate files for the contract (ie class definition) and the implementation. The full 2.0 implementation added a number of much needed things, but it was still showing its age
And it is a shame that there isn’t a GCC implementation of Swift. That being said it does look to be a nicer alternative than BOOPSI. I just wish it were something a bit more … alive.
How about Rust or D?
I guess it is about the object model.
Objective C was a smalltalk-esque runtime embedded (in a rather crude way) into C. Swift was designed to interact with that kind of objects (as Apple Kits are based on that).
Note that current Apple inherits from NeXT that was heavily influenced by Smalltalk.
I guess that the Amiga team had strong influence from the Smalltalk world (at least the early one). At the very least, Carl Sassenrath had early exposure to Smalltalk. In the Amiga OS world message passing semantics are pervasive (likely an influence). BOOPSI in particular was quite radical “message-passing” based… which should map nicely to objective C’s message passing (and to Swift as well).
However, the BOOPSI way, the way I remember it, was quite crude and barely automated. Having to explicitly write a dispatcher function and manually assign numeric values to message names (instead of relying on automatic ‘tokens’ – selectors).
Both BOOPSI and Obj-C are both based on true message passing, so it was a clean fit.
There is another factor why they picked Obj-C: processor support. GCC has good support for PPC and longstaning support for Obj-C. So between that and an message passing it was a clean fit.
To use Rust, D, or almost any other compiled OO language would require it was supported by their development stack as well as writing wrappers to adapt method calling to message dispatching; and I suspect that was a bit more work than they wanted to tackle.
I know clang has support for PPC, so it should be possible to port full Obj-C 2.0 support, and other languages like Swift (which also supports message passing); but again that may be more work than they are willing to tackle right now.
Even Haiku has basic (unstable + unbootstraped) Rust support. I’m sure MorphOS could do the same ๐
But Haiku is basse on a method calling (as opposed to BOOPSI and Obj-J message passing) mechanism. So of course Morphos can support Rust, or Go, or D, or almost any language; it is that either the compiler would have to be modified to allow for transparently adapting the two mechanisms, or the author of the code would have to write their own at the application layer.
Objective-C maps cleanly, so they used it. It makes sense, especially since Obj-C is a strict superset of C, so you should be able to port legacy code fairly quickly.
Swift would make a lot more sense looking forward, and maybe when MorphOS finally runs on x64 they will use it…
It is not Amiga if it is not late to the party.
I think Objective-C makes sense here.
It’s a language that allows very easy interop with C (the previous language used), and has a very similar object model and implementation to BOOPSI.