Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, that is how microservices were implemented in the days of NeXTSTEP. with PDO.

https://en.wikipedia.org/wiki/Portable_Distributed_Objects



It's how many things are implemented, like UI message routing, IPC, undo, test mocks.


So why did Swift become a thing? Or does Swift has this too?


Because Objective-C being based on C, means it would never be safe while remaining compatible with C.

Also dynamic runtime dispatch Smalltalk style can never be as fast as the VMT based dispatch, or compile time dispatch via generics, even with all the optimizations in place, that objc_msgSend() has had during its lifetime.

Still, Metal is implemented in Objective-C, so there is that.


Objective-C already has a different compiler I fail to see how the compiler is restricted in the checks it does.


There is always a subset of the population for which it is fashionable to try to make a new language to make things easier. It is inevitable that someone in a sufficiently large organization will try to make one, provided management supports it. Apple is a very wealthy company that is happy to sponsor R&D, had someone interested in this that they sponsored and the result was appealing enough that they decided to adopt it.

That is my understanding of how the process generally works and what I am willing to guess happened. Prior to this, they had been making incremental changes to Objective-C.

That said, from what I have seen of the syntax of both languages, swift’s syntax is nicer and that is not something that they would have been able to get from Objective-C. They already had tried syntax reform for Objective-C once in the past and abandoned it.


Because Objective-C does not have foo.bar() style method calls and that's what everybody else uses and wants.


Swift isn't messaging-based, it's protocol-based. (Except it's also messaging-based if you use @objc.)


Because Swift adds many other features.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: