Re: Stage 0 proposal: specifying concurrency for "for...of" loops potentially containing "await" statements

2019-09-06 Thread Michael J. Ryan
With the promise.all, would each item in the iterable be an async function (or function returning a promise)? I mean, I'm presuming the point is to not have every item execute at the same time. -- Michael J. Ryan Website: https://www.tracker1.info/ Email: track...@gmail.com Mobile: 480-270

export with get/set option

2018-10-28 Thread Michael J. Ryan
via export { name:value } in an object. While the former method does work, I just think having a getter/setter interface would be an interesting flexibility... Not sure how difficult a change it would be to making import variables assignable and allowing the set transparently. thoughts? -- Michael J.

Re: Has there ever been discussion around a python-like "with" syntax?

2018-10-17 Thread Michael J. Ryan
I was going to mention C#'s using statement as well... though I do like the use of a symbol over Ron's proposal, I think using might be a better approach. -- Michael J. Ryan 480-270-4509 https://www.tracker1.info/ m...@tracker1.info track...@gmail.com On Mon, Oct 15, 2018 at 11:50 AM Till

Re: javascript vision thing

2018-09-22 Thread Michael J. Ryan
Considering how many js devs fail to answer "what values evaluate to false in JavaScript". It isn't the new features that are the problem. There's a combination of problems. People believing they're better developers than they are. People who look down on js and front end development. And

ESM exporting getters and setters.

2018-09-20 Thread Michael J. Ryan
cases... I know, total side effects and mutations, all the same, would be a nice to have in a few cases. -- Michael J. Ryan 480-270-4509 https://www.tracker1.info/ m...@tracker1.info track...@gmail.com ___ es-discuss mailing list es-discuss@mozilla.org https

Re: JSON support for BigInt in Chrome/V8

2018-07-17 Thread Michael J. Ryan
Out of bounds as you'd still have to parse it, but for encoding, could add BigInt.prototype.toJSON ... On Tue, Jul 17, 2018, 15:44 Andrea Giammarchi wrote: > I guess a better example would've been `Boolean('false')` returns true, > but yeah, I've moved slightly forward already with everything,

Re: Adding support for enums

2018-06-09 Thread Michael J. Ryan
Just use symbols for your action type On Sat, Jun 9, 2018, 14:21 Doug Wade wrote: > Hello friends! > > I had a bug the other day on my team. We use redux to > manage the state on our application , which > is maintained by a large team. In

Re: Suggestion: Add Standard IO Streams

2018-04-29 Thread Michael J. Ryan
Why not create an npm module that represents what you'd like to see as an interface wrapping node's implementation and propose your new interface? This way you can try building something with it. You'll first need to implement how you see a synchronous stream in the first place. Streams can be

Re: performance benchmark of async-design-patterns - recursive-callbacks vs. promises vs. async/await

2018-04-29 Thread Michael J. Ryan
Nice... And not really surprising. I am slightly surprised async/await is so close to promises. Which means that improving promises performance should probably be a priority. I still feel the easier to reason with code is well worth it, given many apps now scale horizontally. On Sun, Apr 29,

Re: Re: Proposal: Conditional `catch` in Promises

2018-04-25 Thread Michael J. Ryan
Maybe approach typescript on this one... Not sure if that supports typed errors like C# does, but would probably suit you well. On Wed, Apr 25, 2018, 08:31 Isiah Meadows wrote: > I'd still prefer we wait until pattern matching [1] gets addressed first, > then tackling

Re: from './foo' import './foo';

2018-04-04 Thread Michael J. Ryan
Personally I like this syntax better, but feel that changing or adding import syntax at this point I'd a non-starter... Not sure what others feel about this one. On Wed, Apr 4, 2018, 09:23 Cyril Auburtin wrote: > Could > ```js > from 'name' import something; > ``` > >

Re: How many ES5 environments are still in use today?

2018-04-03 Thread Michael J. Ryan
LibreJS looks like a browser extension, not a JS engine... Aside, wow, I'm in favor of open-source, but this one is pretty out there. -- Michael J. Ryan - http://tracker1.info On Tue, Apr 3, 2018 at 11:11 AM Joe Eagar <joe...@gmail.com> wrote: > LibreJS? The FSF is seriously e

Re: How many ES5 environments are still in use today?

2018-04-02 Thread Michael J. Ryan
I'd add in Adobe's ExtendScript variant as well, which is stuck at ES3, and in InDesign isn't even completely shimable (my suffering has been in InDesign lately). Although, most who touch Adobe ExtendScript are well aware of its' limitations. -- Michael J. Ryan - http://tracker1.info On Mon

Re: Allow arrow functions with conventional 'function' declarations

2018-03-29 Thread Michael J. Ryan
While I appreciate your sentiment, and often relied on housing myself. These days I'd be inclined to continue with the classic funny definition and hosting, or more likely to break it into a separate, testable module. Not to be contain. On Thu, Mar 29, 2018, 02:31 Michael Luder-Rosefield

Re: Array.prototype.repeat

2018-03-27 Thread Michael J. Ryan
Or for that matter, similarly Array.fill(), which has the same signature, but an empty array as Array.prototype.fill. -- Michael J. Ryan - http://tracker1.info On Tue, Mar 27, 2018 at 5:24 PM Michael J. Ryan <track...@gmail.com> wrote: > How about somet

Re: Array.prototype.repeat

2018-03-27 Thread Michael J. Ryan
push(filler); } } return ret; } [].fill(0, 3) // [0, 0, 0] [].fill(['a', 'b'], 2) // [['a', 'b'], ['a', 'b']] [].fill(['a', 'b'], 2, true) // ['a', 'b', 'a', 'b'] -- Michael J. Ryan - http://tracker1.info On Mon, Mar 26, 2018 at 12:02 PM Cyril Auburtin <cyril.aubur...@gmail.com> wrote

Re: partial spread syntax

2018-03-27 Thread Michael J. Ryan
I'm not sure I'd prefer this over just using a function on the Array prototype... you aren't saving too many characters and are adding some ambiguity with regards to {} usage. I don't like it. -- Michael J. Ryan - http://tracker1.info On Mon, Mar 26, 2018 at 5:25 AM Mike Samuel <mike

Re: Array additions

2018-03-27 Thread Michael J. Ryan
Agreed, decent additions... also bonus for being shimmable (no new syntax). -- Michael J. Ryan - http://tracker1.info On Sun, Mar 25, 2018 at 11:49 PM Isiah Meadows <isiahmead...@gmail.com> wrote: > I have a few (typed) array additions I'd like to see added, detailed > in this

Re: Re: Function composition vs pipeline

2018-03-22 Thread Michael J. Ryan
Nobody is wishing away anything with a linter. The linter can only enforce a choice not to use a given language feature. In any case, I feel this syntax is very valuable, fairly obvious in use, and similar to use in other languages. Pipeline/composition are important features, touched on by

Re: JSON.canonicalize()

2018-03-19 Thread Michael J. Ryan
JSON is utf-8 ... As far as 16 but coffee points, there are still astral character pairs. Binary data should be enclosed to avoid this, such as with base-64. On Fri, Mar 16, 2018, 09:23 Mike Samuel wrote: > > > On Fri, Mar 16, 2018 at 11:38 AM, C. Scott Ananian

Re: Pointers

2018-03-19 Thread Michael J. Ryan
Please no, mutable objects are bad enough imho. On Mon, Mar 19, 2018, 12:47 Sebastian Malton wrote: > Proposal: > Add a new variable-esk type called pointer which acts sort of like a > reference to the data which it has been assigned to but modifies also the > original

Super function

2017-08-28 Thread Michael J. Ryan
eady has some similar constructs. In this case it must be a named function or named variable assigned a function. Not a reserved word (break while, break for, etc already works) -- Michael J. Ryan - track...@gmail.com - http://tracker1.info Please excuse grammar errors and typos, as this message was

Re: super return

2017-08-28 Thread Michael J. Ryan
if (arr.find(e => typeof e != 'number')) throw new Error('...'); return arr.map(e => { if (!...) throw new Error(...); return e * 2; }); Odds are you need a conditional block, might as well be try catch. -- Michael J. Ryan - track...@gmail.com - http://tracker1.info Please excuse g

Re: super return

2017-08-28 Thread Michael J. Ryan
Well, there's already .map(), .find() and .filter() for returning values from arrays -- Michael J. Ryan - track...@gmail.com - http://tracker1.info Please excuse grammar errors and typos, as this message was sent from my phone. On Aug 28, 2017 12:30 PM, "Sebastian Malton&quo

Re: Return value of forEach

2017-07-07 Thread Michael J. Ryan
Woudn't Array.prototype.all satisfy those use cases, they run until a falsy value is returned. -- Michael J. Ryan - http://tracker1.info On Thu, Jul 6, 2017 at 6:51 AM, Naveen Chawla <naveen.c...@gmail.com> wrote: > Suitable for that would be an "until" function th

Re: Add timezone data to Date

2017-06-20 Thread Michael J. Ryan
, such as DateTimeOffset ... Mainly that indexing in documentation, and Autocomplete will be more discoverable. Even if the sub-type is more intuitive in speach than type-sub -- Michael J. Ryan - track...@gmail.com - http://tracker1.info Please excuse grammar errors and typos, as this message was sent

Add timezone data to Date

2017-06-20 Thread Michael J. Ryan
into js. Since even with a library the amount of tz data is pretty large and every increasing. Also, normalizing the zones and current offset and support for dst is a big plus imho. I'm pretty sure this had been discussed before, but have only been liking here a year or so now. -- Michael J. Ryan

Re: Feature request: Array.prototype.random

2017-06-20 Thread Michael J. Ryan
Just putting in my $.02 I'm thinking math-rnd-util as an npm module would be a place to start... Then propose extending Math.rnd = rnd-util Rnd.fill(array) Rnd.pick(array) Rnd.pick(min:int, max:int) ... I suggest flushing things out in a usable npm module would be a good start. -- Michael J

Re: Why are object initializer methods not usable as constructors?

2017-05-17 Thread Michael J. Ryan
But if you're introducing a new Class library, your writing new code... You could almost as really setup a build chain (Babel) to support class syntax, if you can't already target sorted browsers. -- Michael J. Ryan - track...@gmail.com - http://tracker1.info Please excuse grammar errors

Re: Default values for specified properties

2017-04-21 Thread Michael J. Ryan
I always assumed it was an implementation detail historically... stack is also not enumerated, though message is more surprising... I tend to remember for logging/server purposes in particular, and call it out in my clone library, as I've been hit by it many times. -- Michael J. Ryan - track

Re: Default values for specified properties

2017-04-21 Thread Michael J. Ryan
I've always felt that made cloning and serializing Error based instances particularly fun. -- Michael J. Ryan - track...@gmail.com - http://tracker1.info Please excuse grammar errors and typos, as this message was sent from my phone. On Apr 20, 2017 9:40 PM, "T.J. Crowder"

Re: Re: Strict Relational Operators

2017-04-12 Thread Michael J. Ryan
matching types is a Boolean. Object.* could just defer to the prototype implementation of the first value.. null or undefined always returning undefined. -- Michael J. Ryan - track...@gmail.com - http://tracker1.info Please excuse grammar errors and typos, as this message was sent from my phone

Re: Re: Strict Relational Operators

2017-04-12 Thread Michael J. Ryan
doing a strict compare, one can presume you should know what you're comparing. -- Michael J. Ryan - track...@gmail.com - http://tracker1.info Please excuse grammar errors and typos, as this message was sent from my phone. On Apr 11, 2017 10:46 PM, "felix" <feli...@gmail.com> wrote

Re: Strict Relational Operators

2017-04-11 Thread Michael J. Ryan
It's definitely an interesting idea... Been trying to consider what character would be added to represent a strict comparison... Perhaps @? >@ <@ <=@ >=@ ... Not sure how this might conflict with decorators... -- Michael J. Ryan - track...@gmail.com - http://tracker1.info P

Re: Proposal: Boolean.parseBoolean

2017-03-21 Thread Michael J. Ryan
truthy values/strings that can predictably be converted as a true, where all else is false. If all it does is: input => String(input).toLowerCase() === 'true'; what is the point of extending Boolean? -- Michael J. Ryan - http://tracker1.info On Mon, Mar 20, 2017 at 10:47 PM, Dmitry Soshn

Re: Proposal: Boolean.parseBoolean

2017-03-20 Thread Michael J. Ryan
red values I've seen in the wild. --- Dmitry, sorry, meant to reply-all the first time, also refactored the polyfill slightly to better account for potentially too long an input value. -- Michael J. Ryan - http://tracker1.info On Mon, Mar 20, 2017 at 4:41 PM, Michael J. Ryan <track...@gma

Re: Proposal: Boolean.parseBoolean

2017-03-20 Thread Michael J. Ryan
I would add case insensitive "t", "y", "yes", 1, -1 as well -- Michael J. Ryan - track...@gmail.com - http://tracker1.info Please excuse grammar errors and typos, as this message was sent from my phone. On Mar 20, 2017 11:54 AM, "Dmitry Soshnikov" <d

Re: Standardizing conditional try/catch

2017-03-19 Thread Michael J. Ryan
Could also do like C# does and treat just `throw;` as an explicit rethrow... I'm also not sure a lot of optimizations are needed as this is exception handling as otherwise mentioned. -- Michael J. Ryan - track...@gmail.com - http://tracker1.info Please excuse grammar errors and typos

Re: Standardizing conditional try/catch

2017-03-18 Thread Michael J. Ryan
The if condition doesn't need to be limited to instance of... catch (err if !isNaN(err.status)) Aside: entering code in a phone is hard... -- Michael J. Ryan - track...@gmail.com - http://tracker1.info Please excuse grammar errors and typos, as this message was sent from my phone. On Mar 17

Re: Field initializers

2017-03-18 Thread Michael J. Ryan
Interesting concept... What about inheritance? -- Michael J. Ryan - track...@gmail.com - http://tracker1.info Please excuse grammar errors and typos, as this message was sent from my phone. On Mar 18, 2017 12:03 AM, "just nobody" <kingd...@gmail.com> wrote: > Would it

Re: Re: Partial matching a string against a regex

2017-03-04 Thread Michael J. Ryan
I actually like the idea... You can do an optional matching block for parents (...)? But that would be patterns for each character... Having a String.startsWith that can do a match against the start of a rexexp would be cool. and/or regex.testStart -- Michael J. Ryan - track...@gmail.com

Re: Ranges

2016-11-04 Thread Michael J. Ryan
t; About the code points: `String.range` should also handle surrogate >>>> pairs, similar to for..of does it. >>>> About `String.range("A", "zzz")`: Do any other possibilities even make >>>> sense? >>>> >>>> On Th

Re: Proposal of Multithread JavaScript

2016-11-03 Thread Michael J. Ryan
Workers define a clear boundary... In Windows, only the main thread can touch the ui.. and in Linux, threads are almost as expensive as processes... Just the same, I'm okay with threads, but feel that not having shared state I'd better as you will avoid a large amount of potential bugs. Having

Re: Ranges

2016-11-03 Thread Michael J. Ryan
If there's a Number.range, if suggest a corresponding String.range for character ranges... Agreed on it being a utility function over me syntax. On Nov 3, 2016 10:25 AM, "Isiah Meadows" wrote: > If string ranges are based on character codes, it will (for the Latin >

Re: Proposal of Multithread JavaScript

2016-11-02 Thread Michael J. Ryan
things write code... Having a clear worker pattern is safer... Adding internalized immutables to improve message passing would be nice, as would an rpc to promise interface... Real threads however is a truly bad idea in JS... On Nov 2, 2016 8:31 AM, "Michael J. Ryan" <track...@gma

Re: Proposal of Multithread JavaScript

2016-11-02 Thread Michael J. Ryan
There is a difference between thread safety and unexpected event ordering in a higher level language.. just because you don't think of it in the language doesn't mean it isn't there... Also the js environments are multi threaded, it's just those threads are for internals and abstracted away from

Re: Proposal of Multithread JavaScript

2016-11-02 Thread Michael J. Ryan
Given how many bugs I've dealt with involving race conditions in .Net, I would really rather have a solid worker pattern over any internal threading inside the main event loop in js as this thread has proposed... Adding an rpc-like promise callback in addition to, or over message passing would be