4 ms·
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 plug
by mojuba 2y ago
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.
- pjc50 2y agoI'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)
- mojuba 2y agoYes, 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.
- pjmlp 2y agoObjective-C has plenty of dynamic moving parts, although C is part of the picture.
- mojuba 2y agoWith 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.
- pjmlp 2y agoObjective-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.
- mojuba 2y ago> 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`.
- wruza 2y agoBut 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.
- pjmlp 2y agoSorry, 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.
- wruza 2y agoApple 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”).