3 ms·
var means let, let means const Reshuffling concepts names is just a bad idea. from … import … Would help autocompletion, a good idea. The pythonic cumbersome
by wruza 4y ago
var means let, let means const
Reshuffling concepts names is just a bad idea.
from … import …
Would help autocompletion, a good idea. The pythonic cumbersomeness of changing “import foo” to “from foo import …” is not relevant here, since bare imports do not create a symbol, so there is low chance you’d ever need to do it.
get rid of await
Not gonna happen. You can’t know in advance what a function returns, so it’s either a performance hit of awaiting every call, or true stackful coroutines (aka green/light threading, cooperative multitasking, etc), which javascript will never get by “design of browsers who don’t want to rewrite their C++ code to support this type of continuations”. That’s the official position of those in charge.
Postfix foo.await is not compatible with object key semantics. A key can be any(?) identifier-like token: foo.class, foo.function, foo.await, foo.delete, etc. You may want to prohibit that before implemeting .await operator and explain yet another inconsistency with +5728 upvotes on SO.
Also, some people simply like explicit await. Both camps are right in different situations.
arrow func return object
=> ({…})
The proposed solution is a heuristic. You don’t want heuristics like that in code usually, because you end up with {; …} hacks which turn into a habit.