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

Most of the mainstream untyped languages are the "children of the 1990s", the era of a delusion that PC's can only get faster and that a computer is always plugged to a free power source.

Then along came the iPhone that prohibited inefficient languages.

So these cycles don't just happen for the sake of cycles, there are always underlying nonlinear breakthroughs in technology. We oscillate between periods of delusions and reality checks.



I'm not sure the runtime efficiency is the critical determinant: assembly is after all an untyped language (+), Javascript is not really typed and is the major language run on the iPhone (on every web page!).

It was more of a natural language/DWIM movement, especially from Perl.

(+ one of these days I will turn my "typesafe macro assembler" post-it note into a PoC)


Yes, Apple made an exception for JavaScript because of the browser. But in the early days of iOS, dynamic languages were prohibited for power efficiency reasons.


Objective-C has plenty of dynamic moving parts, although C is part of the picture.


With Obj-C it was only dynamic method calls (message sending), the rest was very static and native-code too. I think Apple was after dynamic VM-based languages specifically.


Objective-C has plenty of dynamism, basically you can do almost everything as in Smalltalk.

Apple was after nothing, they got NeXT in a reverse acquisition, thus Objective-C.

Had they kept their Copland plan, or acquired Be, C++ would be the lucky one.

They only introduced Java in OS X, because initially they were afraid Mac OS community, raised in Object Pascal and C++, weren't that keen into adopting Objective-C.

Once they saw otherwise, Java support was killed, and the Apple specific extensions given to Sun/Oracle.


Apple was after nothing

Apple was after “ios and downloadable code for vms/jits that we cannot control is a recipe for disaster” really. And it was.

Partly due to ios “security” based on appstore checks rather than technical ways (private ios apis, calls allowed only under specifically claimed features, and just bugs). Partly due to the fact that running something locally is prone to local vulnerabilities naturally (the same category as “never run curl | bash”).


The majority of downloadable code since day one of iOS app store, is native compiled code from C, C++, Objective-C, nowadays Swift.

The only dynamic stuff VM used by Apple is JavaScript.

Even the original lets make HTML5 apps went nowhere, as given the reception, it took less than one year for the official Objective-C SDK to enter the scene, and the whole HTML5 apps idea was thrown away.


> Objective-C has plenty of dynamism

Sorry but no. Obj-C used to be my bread and butter, I knew it pretty well (alas, poor Yorick! I knew him, Horatio). The only truly dynamic part was message sending and even that got much stricter in later versions of the language, i.e. you wouldn't be able to call any method on any object like before without at least explicitly casting to `id`.


But message sending included properties and KVO/KVC that basically every object in an iphone/osx program used. It wasn’t long until they started to @synthesize these cause everything was a property. Yes, full-C modules could be written and C “interop” was just code, but the main use case was dynamic as hell with a little type checking peppered over it. They promised that objc_msgSend was fast and assembly, of course, but that is dynamic dispatch in basically every line of code still.


Sorry, but that seems like not being knowledged of the spectrum of Objective-C capabilities then, specially to the extent how it was used in NeXTSTEP and first round of OS X frameworks.




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

Search: