Re: javascript vision thing

2017-12-20 Thread Naveen Chawla
Front end. You wouldn't create the uploader in a JavaScript class. You would do so in a component HTML template and use its associated JavaScript class as the model/controller layer. Async stuff is really easy. This doesn't change whether you use the class / a static function / another class. Isi

Re: javascript vision thing

2017-12-20 Thread Pier Bover
> > C#'s event model is like the DOM's or Node's if you were to factor event > names to separate variables, like `foo.bar.listen(callback)` instead of > `foo.on("bar", callback)`. Android's works similarly to JavaScript, > although it uses enums instead of strings. foo.bar.listen(callback) is no

Re: javascript vision thing

2017-12-20 Thread Isiah Meadows
Kai, I'll come at this from a full stack perspective - I've done a lot of both front-end and Node.js work, and I know how they compare. 1. Promises are useful for pretty much any one-off async action. They're *way* easier to manage than callbacks for anything substantial, and they take less code.

Re: javascript vision thing

2017-12-20 Thread kai zhu
> To answer your question, yes I've done async with classes. It poses no additional challenge whatsoever. did you do async with classes on the frontend or backend? because its generally more difficult to do when working with the ui (and also why javascript-fatigue is so prevalent among frontend de

Re: Looking for Champion: Null Coalescing (??) and Null Conditional Member Access (?.) operators

2017-12-20 Thread Ahmad Bamieh
Thank you for this detailed write up! I believe you can help in the existing proposals! Cheers! Ahmad Bamieh, On Wed, Dec 20, 2017 at 10:18 AM, Arash Motamedi wrote: > Excellent! Thanks so much for the pointers. These will be great syntactic > improvements. > > Cheers, > Arash > > On Wed, Dec 2

Re: Looking for Champion: Null Coalescing (??) and Null Conditional Member Access (?.) operators

2017-12-20 Thread Arash Motamedi
Excellent! Thanks so much for the pointers. These will be great syntactic improvements. Cheers, Arash On Wed, Dec 20, 2017 at 12:12 AM, Claude Pache wrote: > There are already official proposals for those. See: > > https://github.com/tc39/proposals > > and search for “Nullish coalescing Operato

Re: Looking for Champion: Null Coalescing (??) and Null Conditional Member Access (?.) operators

2017-12-20 Thread Claude Pache
There are already official proposals for those. See: https://github.com/tc39/proposals and search for “Nullish coalescing Operator” for the first of your suggestions and “Optional Chaining” for the second one. —Claude > Le 20 déc. 2017 à 09:03, Arash Motam

Looking for Champion: Null Coalescing (??) and Null Conditional Member Access (?.) operators

2017-12-20 Thread Arash Motamedi
I’d like to propose two new operators that I’ve appreciated using in C#, with appropriate modifications for Ecmascript. ?? Null-Coalescing Operator The ?? operator is called the null-coalescing operator. It returns the > left-hand operand if the operand is not null or undefined; otherwise it > re

Re: javascript vision thing

2017-12-20 Thread Naveen Chawla
Aynchronicity has nothing to do with whether you use class instance methods or static functions. The only difference is whether `this` or an arg is the instance, and the ability to override in type hierarchies, and whether you can use a plain data object (without functions/methods) as the instance.