> I'm thinking, instead, static methods should be used. It would be more
versatile.
I like the idea of passing both operands as arguments (mainly from an
aesthetics/symmetry point of view), but I can't think of case where it
would be more versatile than instance methods seeing as at least one
argu
It seems like this model can be abused in the same way that having separate
methods for assign operators can be abused. I think having separate
operators and automatically using `[[plusOp]]` if `[[assignPlusOp]]`
doesn't exist is an easier programming model. People who need the extra
performance
> concatenation was expressed by adjacency
I've seen worst in few PL, using adjacency to justify function invocation (
you know ... bash, ES.next @decorators ... )
Although I agree with all the thing we could discuss here, this about
strings is honestly, IMO, the least.
String templates + tags s
According to Brian Kernighan in "Masterminds of Programming":
"A more dubious design decision in AWK is that concatenation was expressed
by adjacency, without an explicit operator; a sequence of adjacent values
is just concatenatedI think that's an example of stupid design."
Bob
__
@Cedric: Your proposed change would break template literals. Consider this
example:
```js
const tag = () => 1;
console.log(tag`test`); // Valid syntax, but no way to keep apart tagged
template literals from your syntax syntactically
```
Further, with your approach, I don't see a way to take care
It would be less to write like example below.
a='a'
console.log(`b${a}`); //7 chars
console.log('b'+a); //5 chars
console.log('b'a); //4 chars -> SyntaxError
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
They don't trim the leading indent, but that's easy enough to implement in
a template tag.
On Tue, May 17, 2016, 12:39 kdex wrote:
> No one says you have to use the "+" operator. Why don't you use template
> literals?
>
> On Dienstag, 17. Mai 2016 16:35:28 CEST Cedric neuland wrote:
> > Hi,
> >
True. We have some special cases w.r.t. object literals, and I've
thought about optimizing `__proto__:` in particular. There's no
fundamental reason we couldn't do it, but so far the syntax does not
seem to be common enough to pay for it.
-j
On Mon, May 16, 2016 at 2:20 PM, Allen Wirfs-Brock
wro
No one says you have to use the "+" operator. Why don't you use template
literals?
On Dienstag, 17. Mai 2016 16:35:28 CEST Cedric neuland wrote:
> Hi,
>
>
>
> I hope this is the right place for this..
> I was wondering why this: 1+'b' +"c"cant be written like this: 1'b'
> "c"
> Perhap
Hi,
I hope this is the right place for this..
I was wondering why this: 1+'b' + "c"cant be written like this: 1'b' "c"
Perhapse this can be a new feature of ES?
greetz Cedric
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.moz
10 matches
Mail list logo