Then cannot you just write `if (!(bool = !bool))` ?Sebastian Malton
It also isn't the just the C language, those are the terms for rounding in mathematics which is why they are used. Seba
.Sebastian MaltonFrom: pranay...@gmail.comSent: May 11, 2018 6:05 PMTo: michalwa...@gmail.comCc: es-discuss@mozilla.org
). Sebastian Malton ___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
a function call and the postpends the parameters with a suitable callback function S
it too.The following functions I propose adding to Sets.1. Union2. Intersection 3. Difference 4. Symmetric Difference 5. ForEach6. Map7. Every8. Filter9. Find10. Some Sebastian Malton ___
es-discuss mailing list
es-discuss
No because this is something that I am proposing as an extension to es import/exportSebastian Malton
. Sebastian Malton ___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org
t file ran Sebastian Malton ___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
` instead of
`undefined`.
Sebastian Malton
Original Message
From: isiahmead...@gmail.com
Sent: March 26, 2018 2:49 AM
To: es-discuss@mozilla.org
Subject: Fwd: Array additions
I have a few (typed) array additions I'd like to see added, detailed
in this repo. By any chance, how many of the
;}```Sebastian Malton ___
es-discuss mailing list
es-discuss@mozilla.org
https
Sorry if I missed a message but would such an initialization be only available
in the first `if` block or also in the subsequent `else if` and `else` blocks?
Sebastian Malton
Original Message
From: isiahmead...@gmail.com
Sent: March 21, 2018 6:18 PM
To: mikesam...@gmail.com
Cc: sebast
export it but that seems clunky Sebastian Malton ___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
e-if block Sebastian MaltonFrom: kaizhu...@gmail.comSent: March 21,
Yes that is basically what I want anyway Sebastian Malton
t:prt name = obj.field.name.fullname;```Here if `name` is updated or if `obj.field.name.fullname` is updated so is the other. Sebast
at a time. Sebastian MaltonFrom: r...@gol.comSent: March 17, 2018 12:19 AM
works
Sebastian Malton
Original Message
From: jackalm...@gmail.com
Sent: March 16, 2018 5:26 PM
To: sebast...@malton.name
Cc: es-discuss@mozilla.org
Subject: Re: Expanding Object Shorthand
On Fri, Mar 16, 2018 at 1:58 PM, Sebastian Malton wrote:
> Yes that is possible but what if you wa
Yes that is possible but what if you want to do the following?
```
var a = {
b: B.b,
c: B.c,
d: B.d,
e: B.e
};
```
Would it not be easier to do the following?
```
var a = {
{ b, c, d, e }: B
};
```
Sebastian Malton
Original Message
From: jackalm...@gmail.com
Sent
.Sebastian Malton ___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org
; } }```Sebastian Malton ___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
This would be redundant because of the `?.` operator once it gets mergedSebastian Malton
w Operator:```jsmyVar ||= "default" ;``` Sebastian Malton ___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
`.Sebastian MaltonFrom: rodrigocarra...@outlook.comSent: November 28, 2017 8:40 PMTo: sebast...@malton.nameCc: es-discuss
? Sebastian MaltonFrom: rodrigocarra...@outlook.comSent: November 28, 2017 8:30 PMTo: es-discuss@mozilla.orgSubject: A way to prevent
Something that is very useful that was recently released into Rust was the idea of using a break statement to break out of the current level. This is already the case for loops but in Rust it was extended to all statements encased in {}.This would make some code a lot easier to understand as it c
.crow...@farsightsoftware.comSent: October 25, 2017 8:10 AMTo: sebast...@malton.nameCc: es-discuss@mozilla.orgSubject: Re: Extend Object Dereferencing On Tue, Oct 24, 2017 at 7:51 PM, Sebastian Malton<sebast...@malton.name> wrote:>> Currently you can do the following >> const {abc, xyz, q
```const a = {b: e.b, c: e.c, d: e.d, g: k.g, h: k.h, i: k.i};```BobOn Wed, Oct 25, 2017 at 12:39 AM, Sebastian Malton <sebast...@malton.name> wrote: I guess I do except for the second part```const a
const {abc, xyz, qnc: {awj}} = obj;```On Wed, Oct 25, 2017 at 12:22 AM, Sebastian Malton <sebast...@malton.name> wrote: This could also be extended to help with cleansing objects.const abc = {cde, def, efg} = obj;Would create an object abc with only those three f
This could also be extended to help with cleansing objects.const abc = {cde, def, efg} = obj;Would create an object abc with only those three fields in it.
Currently you can do the following const {abc, xyz, qnc} = obj;However if you want to go more than one level deep then you have to do it again for each level.I therefore propose the ability to do the following const {abc, xyz, qnc.awj} = obj;And this would create the variables 'abc'', 'xyz', 'awj
I don't think that talking about the syntax is relevant now since it is not important when talking about the reasonability of a suggestion. Saying that the syntax could be `?|`The `do` is much longer than the example. I think that this a reasonable idea.
ut opinion :DOn Tue, 29 Aug 2017 at 16:57, Allen Wirfs-Brock <al...@wirfs-brock.com> wrote:On Aug 28, 2017, at 12:29 PM, Sebastian Malton <sebast...@malton.name> wrote:The outcome of this basically means "return from current context up one level and then return from there”.This wo
:29, Sebastian Malton <sebast...@malton.name> wrote: Thus I propose the new syntax `super return` and any other positive number of supers. This syntax is currently not valid in any scenario and with the current meaning of super seems, to me at least, relativity easy to understand. The outcome o
This is actually exactly what I meant but it looks a lot better. It is also very clean
:29 PM, Sebastian Malton
wrote:
> I have seen some people want to modify some of the array prototype
> functions, especially forEach, so that returning from them returns a value.
> However, I have also seems that this could break things since in some cases,
> again forEach, the ret
ys-- Michael J. Ryan - track...@gmail.com - http://tracker1.infoPlease excuse grammar errors and typos, as this message was sent from my phone.On Aug 28, 2017 12:30 PM, "Sebastian Malton" <sebast...@malton.name> wrote: I have seen some people want to modify some of the array prototype func
I have seen some people want to modify some of the array prototype functions, especially forEach, so that returning from them returns a value. However, I have also seems that this could break things since in some cases, again forEach, the return value in explicitly defined. Thus I propose the new
1. What is the difference between "normal" and "return"?2. As previously stated a new type would probably be best since this can be made much better then what is essentially a try/catch.Since try catching is not very efficient it would be better to have some sort of type. However, this leads to h
Should not a value be able to be changed? I don't believe that you can change a function after definition; you can, however, change a function reference.
I thought that the consensus was that pattern matching (like match in Rust) was not desirable in JS. I am pretty sure we have had a discussion about it.
That does sound very useful however it has to work (somehow) with NodeJS where the name of objects can change through requiring. Would the type be the original name or the name in the current file?
d it not?
On Friday, August 4, 2017 8:35:52 PM CEST Sebastian Malton wrote:
> I don't specifically have an exact use case but I can definitely think of
> some use cases for them. However, if these sorts of functions also work for
> array iterators then a reverse entries fu
ouldn't get the same treatment.What's your use case?On Fri, Aug 4, 2017 at 11:19 AM, Sebastian Malton <sebast...@malton.name> wrote: This function would be like find but would iterate from back to front. We already have find/findIndex but unlike indexOf they don'
This function would be like find but would iterate from back to front. We already have find/findIndex but unlike indexOf they don't have a last counterpart.Sebastian
I remember that was a proposal for operator overloading. Was it decided against? I think that packages could solve this and many other problems if there was overloading. Sebastian
I agree. There was a post on those email chain some time ago about moving to another platform. We already have TC39 why not move everything that we do here to there and have PRs be the finalization step. That is what Rust does, what CSS-WG does (sort of)
I propose something list how rust does it. They have a git repo for RFCs and that allows people to to star it or just follow the ones that they want to follow.Sebastian
When creating objects I think that having some notation to make the following easier to readlet query = { $pull: {}};query[team] = userId;I was thinking of borrowing from the above notation and doing the following:let query = { $pull: { [team]: userId }};
Using the ~ to count from the back of the array.Basically ```jslet x = [1,2,3,4,5];x[4] === x[~0] === 5; //I know this is not how JS checking works```Sebastian ___
es-discuss mailing list
es-discuss@mozilla.org
https://m
If that is a concern then allow C-style block comments or some other style of block comments Sebastian
Would allowing for each to have the following two properties also help? 1. Returning a falsy value ends the chain and the next element will not be called 2. Ability to pass in a call back as parameter 4 and if present will stop the next element from being iterated over until the callback is calle
the property b that has the value 5.The second clause works the same but recursively.And the third simply checks if obj is equal to 'rof'.Den 30 juni 2017 16:46 skrev "Sebastian Malton" <sebast...@malton.name>: Are you thinking kind of like Rust's match statement? I t
Are you thinking kind of like Rust's match statement? I think that something like that would be quite a good addition.Sebastian
This looks quite cool but I have a question. Would fixing this allow for non- blocking calls called within a try / catch when throwing an error be caught by that catch statement?
On Thu, Jun 22, 2017 at 7:56 AM, Sebastian Malton
mailto:sebast...@malton.name>> wrote:
I would like to propose that the dot or '.' is allowed in object
field names so that the following are allowed.
var obj = {
field1: "val" ,
field2.fie
: June 22, 2017 1:14 PMTo: sebast...@malton.nameCc: es-discuss@mozilla.orgSubject: Re: Allowing object field name shorthand On Thu, Jun 22, 2017 at 5:53 PM, Sebastian Malton <sebast...@malton.name> wrote: I would say that the easiest benefit would be the shorthand.But as I pointed out, it
gainst those, the only real benefit I see is that it's *slightly* more concise in the case of an object with a single property; but as of even a second property, it's more verbose.Sorry, this ran longer than I meant it to. Not trying to bash the idea, these are just the things that jumped ou
I would like to propose that the dot or '.' is allowed in object field names so that the following are allowed. var obj = { field1: "val" , field2.field3: 3, field2.field4: true};would become var obj = { field1: "val" , field2: { field3: 3, field4: true }};and even
59 matches
Mail list logo