1,958 karma · joined April 19, 2011
To me it makes more sense to either go completely native with Swift and Cocoa / Cocoa Touch or use hybrid model where HTML 5 content is embedded with the new WKWebView API (aka WebKit 2).
WebKit 2 framework will become public in iOS 8 and OS X 10.10 which means hybrid HTML5/Native apps will be able to run with full speed thanks to JIT, split process model and other optimisations.
[1] http://en.wikipedia.org/wiki/Voiced_palato-alveolar_affricat...
http://i.imgur.com/0xWZm8z.png
I'm working on a vector graphics editor simillar to Expression Design and Inkscape. The project is written primarly in ECMAScript 6 (via Traceur) and will be shipped on Chrome Web Store, Mac App Store and Play Store later this year.
Of course humans were not a subject to strictly controlled selective breading like dogs, which means we have much fewer and less diverse races. Still, this is not something that should be completely ignored when trying to understand human behavior, both social and genetic traits matter.
1. Crockford's C style with cached array length (fast and flexible, but verbose):
for (let index = 0, length = array.length; index < length; index += 1) {
console.log(index, array[index]);
}
2. Functional style (terse and flexible, but slow): array.forEach((value, index) => console.log(index, value));
3. Python style (fast and terse, but not flexible): for (let value of array) {
console.log(value);
}
By "flexible" I mean being able to e.g. iterate over items with odd indexes or in reverse direction.The article references a talk by Zakas who says that all modules should be completely decoupled and communication should be done via a global messaging bus ("the sandbox"). In most cases this approach is an overkill, it will lead to awkward situations where module fires events telling the mediator what should happen rather than what has happened.
I agree there should be as little coupling between modules as possible, but if there is some coupling needed, it should be explicit and clearly stated with direct function calls rather than hidden behind the mediator.
The "module with facade" pattern might make sense in code generated by a compiler, but I would never use this ugly hack in code that is going to be read by other developers. Instead of trying to hide stuff by misusing the return statement and closures I would just use underscore notation.
MVC frameworks are overhyped, you don't need them to write maintainable large projects. Check e.g. WebKit Inspector [1] or Gnome Shell [2] source code, those are great examples of how large JS application should be written.
[1] https://github.com/WebKit/webkit/tree/master/Source/WebInspe...
Chrome meets all criteria to be classified as malware software, just because a big name company is behind it doesn't make it any less malicious.
Also, is WebKit2 framework still private on OSX 10.9?
- Do not use passwords that are simple words or phrases
- Use different types of characters in your password (uppercase
letters, lowercase letters, numbers, and symbols).
http://xkcd.com/936/This is how e.g. Array.prototype.filter() works in JavaScript:
var numbers = [1,2,3,4,5,6,7,8,9,10];
var evenNumbers = numbers.filter( function(number) {
return number % 2 === 0;
});Both Expression Design and Fireworks are now out of the way, so Inkscape could get a lot more traction.
Constructors and "new" were there from the beginning. Nobody have even noticed the prototypal nature of JS until people like Crockford started evangelising it 10 years later, which in turn resulted in the addition of Object.create() in ES5.
Evolving JS into language with minimal dynamic classes such as Python or Ruby should be easy as all interfaces are already "classical", you just need to add some syntactic sugar. This approach was already proved to work by CoffeeScript and TypeScript. I can't imagine how JS could be evolved into clean prototypal language such Io without breaking backwards compatibility.
There is no hope for JavaScript to become elegant prototypal language because of the design mistakes that were done in the past. All that TC39 / ECMAScript.next committee can do is put even more lipstick on a pig.
http://this-plt-life.tumblr.com/post/36425234595/when-somebo...
http://this-plt-life.tumblr.com/post/41438931672/when-somebo...