Re: Proposal: minus operator for the spread operator

2020-05-12 Thread Felipe Nascimento de Moura
hm, personally, I find it useful when extracting properties from objects! I have myself been in situations where I had to deal with "all other properties except...". An alternative would be simply extract it normally, but ignore it (which triggers complaints from linters). Perhaps `!` could be a

Re: syntax for case ranges

2020-01-31 Thread Felipe Nascimento de Moura
Very interesting. Once I wanted (and would have used a lot) something like a `switchMatch`. It would work like this: switchMatch(value) { case /\d+/: { ... } case /\s+/: { ... } case /.../: { ... } default: { console.log('Didn't match any of the options'); } } Of course you can

Re: Optional chaining syntax but with the "mice" operator ?

2019-09-06 Thread Felipe Nascimento de Moura
Doesn't that bring risks to breaking the web? You seen, many, MANY servers running php have the "shot-tags" feature enabled, in which pages with will be interpreted. In this case, any html page with embedded scripts using this operator, or event .js files when the server is configured to also

Re: effect of editor/ide on javascript programming-style

2019-06-29 Thread Felipe Nascimento de Moura
Really?! That actually surprises me! I haven't used vim to develop for quite a while, but always saw it as a reference in performance. For instance, I'm right now with 5 different VSCode windows opened (each one with a different workspace, for each project I'm currently working on), and each of

Re: Proposal: 1) Number (integer or decimal) to Array 2) Array to Number (integer or decimal)

2019-03-09 Thread Felipe Nascimento de Moura
Personally, I don't think it would be THAT useful... but...I think there is something behind this proposal that makes sense. I do believe it could be useful for developers to have an easier access to number parts or characteristics. Perhaps something like: const i = 1234.567; console.log(

Re: Submitted for your approval, JSOX

2018-09-18 Thread Felipe Nascimento de Moura
I agree with that. I too feel JSON could have an upgrade! For instance, I almost always use JSON5 (https://json5.org/) transpilation in any project I have to deal with JSON files. [ ]s *--* *Felipe N. Moura* Web Developer, Google Developer Expert

Re: Question: HTTPS everywhere...problem

2018-08-04 Thread Felipe Nascimento de Moura
HTTPS for >>> more APIs in the future. >>> >>> Zachary Yaro >>> >>> On Sat, Aug 4, 2018, 18:08 Claude Pache wrote: >>> >>>> >>>> Le 4 août 2018 à 22:22, Felipe Nascimento de Moura < >>>> felipenmo...@gmail.

Re: Question: HTTPS everywhere...problem

2018-08-04 Thread Felipe Nascimento de Moura
lt;http://twitter.com/felipenmoura> Facebook: http://fb.com/felipenmoura LinkedIn: http://goo.gl/qGmq - *Changing the world* is the least I expect from myself! On Sat, Aug 4, 2018 at 7:08 PM Claude Pache wrote: > > Le 4 août 2018 à 22:22, Felipe Nascimen

Question: HTTPS everywhere...problem

2018-08-04 Thread Felipe Nascimento de Moura
Hi. I know of (and I also support) the HTTPS everywhere campaign. With that said... I'm working on a software for a factory which will have: - 1 server in a room, with a node server running on it - many cellphones sending pictures - no internet access, everything works within the same, closed

Re: WHO CAN HELP ME TO UNSUBSCRIBE THIS EMAIL

2018-04-19 Thread Felipe Nascimento de Moura
well, access the link: https://mail.mozilla.org/listinfo/es-discuss then look for the part that talks about "unsubscrib" is that what you needed? [ ]s *--* *Felipe N. Moura* Web Developer, Google Developer Expert , Founder of BrazilJS

Re: add reverse() method to strings

2018-03-19 Thread Felipe Nascimento de Moura
yep agreed...that's not enough reason (I just added that might be "the reason for..."). Cheers. [ ]s *--* *Felipe N. Moura* Web Developer, Google Developer Expert , Founder of BrazilJS and Nasc

Re: New Object from Object extraction

2018-03-18 Thread Felipe Nascimento de Moura
, T.J. Crowder < tj.crow...@farsightsoftware.com> wrote: > On Sun, Mar 18, 2018 at 7:06 PM, Felipe Nascimento de Moura > <felipenmo...@gmail.com> wrote: > > So, let's say you want a new object containing only some of the > properties from another object. > > This has

Re: add reverse() method to strings

2018-03-18 Thread Felipe Nascimento de Moura
I have had to use that one, parsing texts and I remember I had to reverse strings that represented tokens...but that was very specific. What I would like to see in strings would be something like "firstCase" for transforming "felipe" into "Felipe" for example. I always have to use something like

New Object from Object extraction

2018-03-18 Thread Felipe Nascimento de Moura
So, let's say you want a new object containing only some of the properties from another object. For example, if I have the Object1 like this: o1 = { a: 1, b: 2, c: 3, d: 4, e: 5 } And I want another object containing Object1's *b*, *c*, and *e*. I could: o2 = {...o1} // a full copy

Re: add reverse() method to strings

2018-03-17 Thread Felipe Nascimento de Moura
I would use `Array.from`: ``` str = "a_\uD83D\uDE80_b" Array.from(str).reverse().join('') ``` But I also upvote the idea of having a reverse method in strings :) If `reverse` might cause some retrocompatibility problem (although I don't think it requires params, what would pretty much avoid

Re: Touch/Trackpad finger position

2017-11-07 Thread Felipe Nascimento de Moura
> strictly-language items are handled by ES. >>> >>> You'll probably want something like Touch Events, defined by the host >>> environment: >>> >>> https://developer.mozilla.org/en-US/docs/Web/API/Touch_events >>> >>> On Tue, Nov 7, 2017 at

Re: Question of the Day: What about all this asynchrony?

2017-11-07 Thread Felipe Nascimento de Moura
Hi. Michael, the JavaScript (and Web in general) communities are very open and always queen to help. I just think you hit the wrong mailing list to discuss all that. For new comers, indeed, there is plenty to work on, practice and study. But keep in mind that many of those features came from

Touch/Trackpad finger position

2017-11-07 Thread Felipe Nascimento de Moura
Hi. If I'm being too crazy here, please let me know! What would it require for us to have an API to get the exact position of fingers/touches from the trackpad? (even it not pressed) For example, let's say someone wants to write a WebApp in which you could sign something, or simply use a (good)

Re: Question ... perhaps a proposal: extract from object to object

2017-03-17 Thread Felipe Nascimento de Moura
received this message in error, please let us know by forwarding > it to i...@farsightsoftware.com and then delete it from your system. > Please don't copy it or disclose its contents to anyone. Separately, note > that email sent over the internet without a digital signature may be > modified e

Re: Question ... perhaps a proposal: extract from object to object

2017-03-17 Thread Felipe Nascimento de Moura
lt in to directly convert between Maps and > objects given their conceptual similarity. In either case though it would > be nice to be able to apply standard processing rules that one applies to > Maps conceptually to an Object (and a Map) natively, like filter and map. > > >

Re: Question ... perhaps a proposal: extract from object to object

2017-03-17 Thread Felipe Nascimento de Moura
g that > there is no native operation built in to directly convert between Maps and > objects given their conceptual similarity. In either case though it would > be nice to be able to apply standard processing rules that one applies to > Maps conceptually to an Object (and a Map) natively, l

Re: Question ... perhaps a proposal: extract from object to object

2017-03-17 Thread Felipe Nascimento de Moura
Hi. Interesting to know that it has already been discussed. I know we could create a function to do similar things, but I think the language itself has evolved so well, this is a use case it could fit somehow. I think there could be different approaches for that, like Object.pick([ 'a', 'c' ],

Question ... perhaps a proposal: extract from object to object

2017-03-16 Thread Felipe Nascimento de Moura
Hi. I am trying to get an object out of another object, with only a few of its properties. I know we can do this: let { a, c } = { a: 1, b: 2, c: 3 } In this case, we have a variable 'a' and a variable 'c'. What I want is { a: 1, c: 3} Is there a way to do it? Something like: let { a, c } as

Re: Short Comparing proposal

2017-02-03 Thread Felipe Nascimento de Moura
(pasting it here...got kinda lost with some other e-mail mixing this thread) hi I started the thread with this question because I thought exactly in both performance (short circuit) and readability. Bear with me: ``` // the expression let x = a || b; // could be let x; if (a) { x = a; } else {

Re: Short Comparing proposal

2017-02-03 Thread Felipe Nascimento de Moura
hi I started the thread with this question because I thought exactly in both performance (short circuit) and readability. I got a little bit lost in this thread here...looks like there are some other e-mails mixed to it! But anyways, bear with me: ``` // the expression let x = a || b; // could

Re: Short Comparing proposal

2017-02-01 Thread Felipe Nascimento de Moura
agree that your proposal would increase > readability, but I'm not a fan of the colon in parenthesis. > In this context, the colon looks like it should represent a member > assignment of 'b' to 'a'. > > > -Ryan Birmingham > > On 1 February 2017 at 11:27, Felipe Nascimento d

Short Comparing proposal

2017-02-01 Thread Felipe Nascimento de Moura
Hi. I wonder if there is already a proposal for such thing or if it would be something interesting to be proposal: *The motivation:* Let's say you have an object whose property you want to compare to 'a' or 'b': ``` if (object.property.secondProp === 'a' || object.property.secondProp === 'b') {

Re: Negative indexes

2016-02-01 Thread Felipe Nascimento de Moura
Yes, that would do what he wants...but I like the idea of using ```arr[-1]```, though!! It just makes sense, to me! Specially if you want to use reversed loops, for example. On Mon, Feb 1, 2016 at 5:46 PM C. Scott Ananian wrote: > `arr.slice(-1)[0]` does what you want,

Re: Negative indexes

2016-02-01 Thread Felipe Nascimento de Moura
ecause it could break existing code. > > On Mon, Feb 1, 2016 at 4:43 PM, Felipe Nascimento de Moura < > felipenmo...@gmail.com> wrote: > >> Yes, that would do what he wants...but I like the idea of using >> ```arr[-1]```, though!! >> It just makes sense, to

Re: Re: The "Pipeline" Operator - Making multiple function calls look great

2015-12-13 Thread Felipe Nascimento de Moura
my 50 cents. I think it is interesting to be added I think this should not really concern to await implementations (would, indeed, get weirder and more complicated)! I don't think this has *anything* to do with bind! No "this" is touched with that! I don't think it has anything to do with

Re: The "Pipeline" Operator - Making multiple function calls look great

2015-12-11 Thread Felipe Nascimento de Moura
What about a backslash instead? Like escaping a function call, such as: foo("some string")\bar\baz; Or `some ${data}` \ foo \ bar \ console.log; On Fri, Dec 11, 2015 at 12:07 PM, Rick Waldron wrote: > Has anyone tried writing grammar for this? The "|>" token

Re: The "Pipeline" Operator - Making multiple function calls look great

2015-11-10 Thread Felipe Nascimento de Moura
I find this interesting, indeed. Although, I believe the ( ) are like "representations OF a function call". I felt like if there was something missing there! What about something like this, then? // exclaim(capitalize(doubleSay("hello"))); doubleSay("hello") |> capitalize |> exclaim; For me,

Re: Proposal: Additional Meta Properties for ES7

2015-02-26 Thread Felipe Nascimento de Moura
Am I the only one who finds it weird to use `function.something` inside a function? ``` function doSomething () { function.self... } ``` That's why I was thinking in something more related to the scope than to the function object itself. On Thu, Feb 26, 2015 at 11:32 PM, Matthew Robb

Re: Function name property

2015-02-26 Thread Felipe Nascimento de Moura
that's true! I miss that too! We are working on a framework for the company here, and sometimes, getting the callee would be really useful, and we simply can't!!! Removing the arguments.caller/calee could make more sense if, like other features, had been replaced by another syntax. What was the

Re: What would a 1JS-friendly strict mode look like?

2014-12-18 Thread Felipe Nascimento de Moura
18, 2014 at 10:46 AM, Alex Kocharin a...@kocharin.ru wrote: 16.12.2014, 17:04, Andrea Giammarchi andrea.giammar...@gmail.com: On Tue, Dec 16, 2014 at 1:50 PM, Felipe Nascimento de Moura felipenmo...@gmail.com wrote: function () { use strict, safe; } This could allow us to even

Re: What would a 1JS-friendly strict mode look like?

2014-12-18 Thread Felipe Nascimento de Moura
did anyone see my suggestion? (actually, am not sure my e-mails are going out!) Personally(again, my opinion), I think it is at least weird, having a floating string on your code! Specially because(by now) this is the only situation, with only one option, what makes it an exception. ES has so

Re: What would a 1JS-friendly strict mode look like?

2014-12-18 Thread Felipe Nascimento de Moura
comment. Anyways, I believe it might be something useful to think about :) Cheers. On Thu, Dec 18, 2014 at 4:32 PM, Till Schneidereit t...@tillschneidereit.net wrote: On Thu, Dec 18, 2014 at 6:50 PM, Felipe Nascimento de Moura felipenmo...@gmail.com wrote: did anyone see my suggestion

Re: What would a 1JS-friendly strict mode look like?

2014-12-16 Thread Felipe Nascimento de Moura
Interesting question! I always found it weird, myself! function () { use strict; } It might be a new token, perhaps? function () { use strict, safe; } This could allow us to even add some extra scoped-options, such as a safe mode...I am pretty sure you guys would have even more options