5 ms·
Maybe I've just swallowed the Kool-Aid, but I don't see the putative benefits of Apple's switching platforms. I'm also not clear on how many people there are wh
by jfb 13y ago
Maybe I've just swallowed the Kool-Aid, but I don't see the putative benefits of Apple's switching platforms. I'm also not clear on how many people there are who a) can write non-trivial software and b) can't learn a C derivative language who c) would actually write software for Apple's platforms. It just seems like a pretty small set.
And, if Apple were to switch, why would they pick a language as shitty as Javascript?
- caycep 13y agoBut it has Good Parts(tm)!
- jfb 13y agoI remain skeptical.
- u2328 13y agoHave you ever written any significant amount of JavaScript?
- jfb 13y agoEnough to not want to do any more.
- u2328 13y agoI take that as a "no." I grew up as a programmer through C++ and Java, and the first time I ever worked on a JavaScript project, I hated it, and I said the same thing about JavaScript as you did. That's because I was thinking like a Java programmer, and not just a programmer. As I worked more and more with JavaScript, I've grown to love. It has it's pitfalls, sure, but there's just so much flexibility in JavaScript than languages like Java or C++. Nowadays, I prefer it to Java or C++. Even for server-side programming. I get the feeling that you don't really know enough to know what you're missing.
- jfb 13y agoI don't write Java or C++.
- deleted 13y ago[deleted]
- bobwaycott 13y agoIt is advisable to taboo your practice of taking any thing X that differs from your viewpoint as a "no". It is also advisable to taboo projecting your own experience/thoughts onto another, as if that is his/her experience/thoughts, as well. That you love JavaScript, even for server-side programming, has absolutely zero significance in evaluating whether jfb (or anyone else, for that matter) knows enough to know what s/he is missing.
- u2328 13y ago> It is advisable to taboo your practice of taking any thing X that differs from your viewpoint as a "no". > It is also advisable to taboo projecting your own experience/thoughts onto another, as if that is his/her experience/thoughts, as well. I disagree with that take. Personal experiences can lend themselves to evaluating context. Humans do it all the time. If one is going to make an argument that something is "silly", and provides barley more than nil context to that argument ("enough to know"), then a context vacuum exists. If the OP isn't going to provide it, then someone else will.
- deleted 13y ago[deleted]
- zackbloom 13y agoClosures + Lexical Scoping + Prototypical Inheritance makes for a pretty great language IMHO.
- ldh 13y agoThose things are indeed nice, but they can't defend against the other insanities that come in the box with them.
- gcr 13y agoOnly a subset of Javascript is useful, just like how only a subset of C++ is useful, just like how only a subset of Objective-C is useful, just like how only a subset of Haskell is useful, ...
- yen223 13y agoWasn't there a saying: "90% of everything is crap"?
- coldtea 13y agoAll languages have crap. C? Buffer overflows, manual memory management, header files, severely lacking standard libraries, crap support for most modern idioms, etc etc. C++? Tons of edge cases, template madness, unbelievable large language spec, etc etc. Python? Python 2 - 3 dichotomy, crappy concurrency / parallelism support, , strict on whitespace, standard libs in various stages of cruft and abandonment, no proper closures, CPU bound for lots of interesting problems necessitating bilingual development with C extensions or the use of hacks such as Cython etc. You can find a similar list for everything, from Lisp to Haskell. Javascript "insanities" are no big deal. People have been creating large apps (including porting stuff like THE WHOLE BLOODY QT TOOLKIT to it) in it with no problems. Once you know them, you can work around them. A huge install base, huge number of programmers, easy syntax, powering the internet, lispy-flexibility, and the fastest interpreters this side of the JVM are enough benefits to counter some crappy coercion rules and FP only math bizarreness.
- pi18n 13y ago
- Arelius 13y agoI actually like Javascript. Sure it has some warts. But it has an elegance I've really only seen in Javascript, Lua, and Lisp.
- drtse4 13y agoYou last sentence is a bit far-fetched.
- stcredzero 13y agoThe referred sentence is a matter of opinion, so it's a bit far-fetched to say it's a bit far-fetched, IMO. From what I know of Lua, it's fairly tiny, and it has ready access to its own meta-level -- to the point where there can be a blurring of programming and meta-programming. Instead of everything "being an Object," everything is in a table. Just rename "table" to "object" and call it a prototypical day.
- drtse4 13y agoNo it's not, jokes aside, implicitly comparing Javascript to Lisp from the point of view of elegance is simply incorrect, for many definitions of "elegance".
- stcredzero 13y agoAnd for how many definitions of "comparable?" Lose a point for careless reading.
- CodeCube 13y agoIt is an elegant weapon, for a more civilized age
- mmariani 13y agoIf you want to shoot your own foot sure!
- 13y ago
- reeses 13y agoWait, don't you remember Steve's original announcement about the great development opportunities on iPhone, where you could use HTML and Javascript? You won't be able to use undocumented APIs because you won't be able to get to them.
- phawk 13y agoI think it's less a specific shift to JS, but more a shift to HTML5 and CSS3. That would probably be a better reason to allow people to write JS apps.
- jfb 13y agoThat's even less explicable.
- marknutter 13y agoNo, your language is shitty!
- ojr 13y agolast time I check a) javascript is a c derivative language and b) it is used for "non-trivial software" c) there will be developers believe it or not that would be able to create maintainable apps that maybe won't be good enough to your standards but I have a small feeling the average consumer will not care, my advice: http://alwaysbetonjs.com/ http://alwaysbetonjs.com/ Apple's on board
- wwweston 13y ago> a) can write non-trivial software and b) can't learn a C derivative language who c) would actually write software for Apple's platforms. It just seems like a pretty small set. Funny. I've sometimes similarly speculated in the past that the set of developers who (a) struggle with JavaScript as a tool for in-browser apps and (b) would actually be genuinely productive with some other dynamic scripting language (Ruby, Python, CoffeeScript) in the same context is pretty small too. But the truth is probably that whether or not someone can develop non-trivial software with any roughly equivalent language is mostly a function of available time to ramp up vs spend on other things. So, sure, Obj C and JS are close enough that anybody who can develop non-trivial software in one can probably do it in the other... but it's still going to be a time investment while you learn how things are done in the language and various associated APIs. I don't know if Apple particularly cares if they're pulling in more developers. If they do, though, adding another language that many developers already know makes sense. It reduces the friction involved. > And, if Apple were to switch, why would they pick a language as shitty as Javascript? On top of the widespread at-least-shallow familiarity, not everyone shares this opinion. Also, this is unlikely to be a "switch." It's more likely to be a gateway.
- wamatt 13y ago>And, if Apple were to switch, why would they pick a language as shitty as Javascript? That seems to be a fairly popular dismissal for a language designed in 10 days, and perhaps rightly so. JavaScript probably classifies as mediocre language compared to the wealth of sanely designed choices we have available today. That said, have you taken a recent look at the next generation of JavaScript aka ES6/Harmony?[1] - Modules? Yup - Maps and Sets? You bet. - Tail call optimizations? Sure - Classes? Finally! etc That's not to suggest that a single iteration will magically fix all of its quirks and shortcomings. However, one possibility could be that Apple picked JS, not on it's checkered history, or the fact that it is popular amongst web developers today, but where it is headed tomorrow and how it could be adopted and adapted. [1] https://wiki.mozilla.org/ES6_plans* https://wiki.mozilla.org/ES6_plans*