Could you explain how your second example is cleaner? All I see is that it's
longer; the rest is merely a matter of taste.
JavaScript's syntax was, amongst others, heavily influenced by C-family
languages (which went for `&&` and `||` as well as `&` and `|`).
Next, I think it's confusing that,
No, please don't do this. While I understand why you want this, I feel like
this is unnecessary and will just introduce yet another way to write
inconsistent and confusing JavaScript code .
\- Jonathan
—
Life is a game and we’re all just high density pixels.
On May 24 2016, at
Hi,
I’d like to be able to use AND for && and OR for || in conditional statements
in a future version of ECMAScript. It’s a feature I’ve always been wanting
since transitioning from PHP. It’s also much cleaner :
if ($scope.newSourceModal.isShown() && $scope.newsource.type == "book" &&
You need to be very careful hacking around in an ad-hoc parser. It's easy
to diverge from the formal (and verified) grammar by accident. Ambiguous
grammars with ad-hoc disambiguation rules codified only by your parser's
source code are bad business. Voice of experience here.
/be
On Sat, May 21,
# importing selected chucks of a module into an object
Modules are always imported into the root scope of the imported file. But in
some cases it can be desirable to load modules into a namespace-object.
Especially when importing a large number of parts/chunks from a module creating
a
On Tue, May 24, 2016 at 11:59 AM, Norbert de Langen
wrote:
> It would be nice to have this option:
>
> ```
> import { parse } as xmlLib from 'xml-lib';
> import { parse } as jsonLib from 'json-lib';
> import { parse } as htmlLib from 'html-lib';
>
> // usage
>
This is usually part of the reason why small modules are recommended,
rather than large object bags of things (including many named exports).
Have you considered putting each thing you want to import as the default
export of a separate file?
On Tue, May 24, 2016 at 9:20 PM, Norbert de Langen <
I think there’s a preference reason for this but also optimization reasons.
For humans it becomes crystal clear exactly what parts are dependent on. I
personally like this.
When importing the entire module the module code needs to be run to figure out
what parts are not needed. Eliminating the
8 matches
Mail list logo