No, JavaScript itself is a ridiculous language. Every time I have to deal with it I grit my teeth. Right now I'm dealing with dates. Luckily JS has a built in Date class! Which, of course, does nearly nothing. If you call "getDay" you get a zero indexed number representing the day of the week. So since there's no formatting functions to print out dates, how do you get the month-day number? Oh, right, you call getDate...
If I didn't know better I would think this abomination were created by someone who thought the secret of PHP's success was being horribly defined.
var myProprietaryDateFunction = function(dt) { return dt.getDate()+'.'+dt.getMonth()+'.'+dt.getFullYear(); };
But in JS, you can pass that function around like a village bicycle -when I think back to my C# days, it makes me wonder how I ever did without functions as first class objects and a slew of other really great things about JS. A lot of those things are brainbangers at first, to be sure - but when you finally grasp them (for me, at least) you start to see that the things that make JS "ugly" to the novice are the same things that make it powerful and elegant in the hands of a master. To each his own - and there are things I do really miss about C# from time to time... but for me, I am all too happy trade the tidier date.Format() for the more powerful underlying functional constructs any day.
C# has delegates, events, lambda function, properties and async function as language constructs. This is as "first class" as it gets. It also has LINQ.
(and be careful not to accidentally concatenate that 1 instead of add)
Nothing wrong with layering approaches, but the problem is knowing where to place the borders in order to give clarity at every level.
1. Support for a browser-appropriate security model (origin-based)
2. Not requiring extra work to pass through HTTP-friendly (and everything-else-hostile) firewalls.
The firewall point is good, although I don't understand why you would want to block general TCP connections but not websock.
But yeah, it sucks that you can't do cross-platform development unless you like to be tied to a web platforms, which tends to result in inferior user experience.
I keep hearing this FUD, but I have no idea where it's coming from. I've never had any problems with the Android documentation. The most annoying part of Android development is probably Eclipse, but I'd rather have a resource intensive IDE that's cross platform than one that only runs on OS X.
In fact, the Android platform has some amazing opportunities for those who are willing to look past the mainstream views on it. Because it's ignored by so many companies/developers, all you have to do is pick an iOS app that is popular and clone it - you are pretty much guaranteed to get lots of users.
Hopefully Android Studio[1] will be the solution to that problem.
>> "I keep hearing this FUD, but I have no idea where it's coming from. I've never had any problems with the Android documentation."
I don't think the Android documentation is bad but I find iOS documentation much better. It might just be because I'm more used to the iOS docs (5 years experience vs. 1 year on Android).
Let's take just one example from literally hundreds that are scattered all over the API reference alone. The delete() method in SQLiteDatabase -- arguably, a mature part of the Android API, considering it's been there ever since version 1 and is something that almost every application uses. Here: https://developer.android.com/reference/android/database/sql..., java.lang.String, java.lang.String[])
The method takes three arguments, but only two are documented. The description of the whereClause states that "Passing null will delete all rows", while the function description says "To remove all rows and get a count pass "1" ass the whereClause". I presume the difference between the two cases is that passing null as the whereClause will delete all rows without giving a count of how many, but that's really poor taste in describing what the function returns.
This simply isn't ok. It's barely enough for internal use, where you'd probably Skype the guy who wrote it, ask for clarification, and kindly ask that they fix it when/if they have time (or you fix it yourself if possible), but this is very far away from what you want from a serious framework. Let's not even stick iOS here. Look at Qt -- which optimistically would have, what, 10% of the users Android has, and a lot fewer developers -- and their documentation is at the very least complete.
Edit:
> The most annoying part of Android development is probably Eclipse, but I'd rather have a resource intensive IDE that's cross platform than one that only runs on OS X
It's definitely Eclipse, but in its description don't forget "unstable" and "still lacking a decent UI builder".
It's not reasonable to throw away all IE 8 traffic just to get Dart's features.
[0] https://en.wikipedia.org/wiki/Google_Chrome#Release_history [1] http://en.wikipedia.org/wiki/Firefox_release_history [2] http://en.wikipedia.org/wiki/Internet_Explorer_8
It's not reasonable to support an outdated browser version with an inferior Javascript engine, or to single out Internet Explorer as a browser for which older versions should still be supported, imho.
(disclaimer: I'm building a webapp that has to work in IE 8)
Most people who are running IE 8 are random non-technical folks who are using the browser that came with their OS. They don't even know what "internet explorer" is.
There are probably a small sub-set of people who have Firefox 3.x because their brother's uncle's nephew installed it once like 5 years ago but I honestly don't mind losing these people as potential customers because it's such a ridiculously small %. I also feel like these are the type of people who would be more than capable of upgrading if they kept seeing messages like "your browser is old as time itself, upgrade or find someone who knows how to do it for you!" through friend/family assistance.
I can't justify throwing away almost 10% (IE 8) market share for Dart and the idea of supporting multiple versions of the app is just too much work for too little return.
http://gs.statcounter.com/#browser_version-ww-daily-20130615...
IE10 has more usage. Hopefully, Win 8.1 is successful for Microsoft and XP usage drops significantly.
Which may well the right trade off for many apps.
cliveowen was clearly talking about "an alternative to Javascript" and "not [...] those things that eventually get translated to Javascript". Anything targeting Asm.js is merely targeting JavaScript.
The "half native speed" claim is quite dubious, at best. Even if it were realistic, that's still quite a horrible decrease in performance relative to native code. It's not as bad as the typically much worse disparity, but it's still not good at all.
http://yuiblog.com/blog/2006/10/20/video-crockford-domtheory...