Re: Since JSDoc seems cerebrally dead...

2020-08-17 Thread Isiah Meadows
reason), so while it's still useful, it's just not used in the same places it was used previously. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Sun, Aug 16, 2020 at 6:39 PM Michaël Rouges wrote: > > Hi all, > > Since JSDoc seems cerebrally dead, why the TC39

Re: Are ES Modules garbage collected? If so, do they re-execute on next import?

2020-07-18 Thread Isiah Meadows
imports to dedupe them and then resolve them accordingly when executing them, rather than consulting external caches every time. (It's also easier for the engine to handle, assuming they don't do this already.) - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Thu, Jul 16, 2020

Re: Are ES Modules garbage collected? If so, do they re-execute on next import?

2020-07-01 Thread Isiah Meadows
eviction). - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Tue, Jun 30, 2020 at 11:57 PM Andrea Giammarchi wrote: > > even if dereferenced, a dynamic import could re-reference it any time, and I > would expect it to still be the same module, it'd be a surprise

Re: Are ES Modules garbage collected? If so, do they re-execute on next import?

2020-06-30 Thread Isiah Meadows
Just to expand on that, if the module record itself is dereferenced (like if it's evicted from the cache somehow), then yes, it should be collected as appropriate. However, I'm not aware of any major implementation that offers that functionality. - Isiah Meadows cont...@isiahmeadows.com

Re: Object.safeAssign

2020-05-01 Thread Isiah Meadows
Missed the list. Also, it apparently does trigger setters. Crossed it up with spread properties (which don't). On Fri, May 1, 2020 at 06:28 Isiah Meadows wrote: > I thought `Object.assign`already used the `Object.keys` + > `Object.defineProperty` algorithms under the hood and thus were

Re: Yet another attempt at typed JS data

2020-02-11 Thread Isiah Meadows
. On Tue, Feb 11, 2020 at 08:44 Isiah Meadows wrote: > You have proof of this? That it doesn't produce a dense array in engines? > > On Mon, Feb 10, 2020 at 01:09 Andrea Giammarchi < > andrea.giammar...@gmail.com> wrote: > >> Unfortunately, `Array.from({ length: 4 }

Re: Yet another attempt at typed JS data

2020-02-11 Thread Isiah Meadows
be any >>>> different >>>> >>>> > I _think_ that moderns virtual machines already did these >>>> optimisations despite there isn't a TypedArray like that. >>>> >>>> It's a bit of a mess to create an Array that is not holed and gets best >>>> optimizations [1]

Async iterator destructuring?

2020-02-07 Thread Isiah Meadows
closer to feature parity. -- - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: syntax for case ranges

2020-02-03 Thread Isiah Meadows
in reverse. > > On Sat, 1 Feb 2020 at 23:12, Mark S. Miller wrote: > >> 3 < 2 < 1; // true >> >> >> On Sat, Feb 1, 2020 at 3:03 AM Naveen Chawla >> wrote: >> >>> Certain languages allow the expression 0>> would be syntactically pos

Re: syntax for case ranges

2020-01-31 Thread Isiah Meadows
> es-discuss mailing list >>> es-discuss@mozilla.org >>> https://mail.mozilla.org/listinfo/es-discuss >>> >> ___________ >> es-discuss mailing list >> es-discuss@mozilla.org >> https://mail.mozilla.org/li

Re: Proposal: strict built-in functions

2019-12-08 Thread Isiah Meadows
_ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > -- - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com ___ es-discuss mailing list es-discuss@mozilla.org https:

Re: Proposal: Property Accessor Function Shorthand

2019-12-03 Thread Isiah Meadows
no mention in the repo, in the open issues, or even in the closed issues or any of the open or closed pull requests. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Tue, Dec 3, 2019 at 5:43 AM Michael Luder-Rosefield wrote: > > At the cost of adding more code, but givin

Re: Re: Proposal: `await.all {...}` for parallelism

2019-11-26 Thread Isiah Meadows
it would resolve a tree of parallel and series like following with >>>> traditional promises >>>> >>>> p0 >>>> .then(x0 => { >>>> const x11 = f11() >>>> >>>> return Promise.all([p1(x0), p3(x11)]) >>>> .then((x1, x3) => >>>> p2(x1) >>>> .then(x2 => >>>> p10(x2, x3) >>>>

Re: Proposal: `await.all {...}` for parallelism

2019-11-20 Thread Isiah Meadows
-control-flow-proposal [4]: https://esdiscuss.org/topic/stream-async-await [5]: https://esdiscuss.org/topic/improved-syntax-for-observable-mapping-and-subscribing [6]: https://github.com/isiahmeadows/proposal-generator-fork - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Wed

Re: Ternary operator enhancement proposal

2019-11-15 Thread Isiah Meadows
-operator/issues/159 - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Thu, Nov 14, 2019 at 4:21 AM Cyril Auburtin wrote: > > the `do` operator might be good enough > > ```js > const z = do { const z = x?.y?.z; z ? doSomethingWithValue(z) : null; }; > ``` > &

Re: Template literal property names in object literals

2019-11-07 Thread Isiah Meadows
ally minor nice-to-have makes it in, though... ----- Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Thu, Nov 7, 2019 at 4:23 PM Alex Kodat wrote: > > Gus, > > Sure, but your (const) example is simply syntactically invalid – > syntactically invalid code will

Re: Optional Curly Braces in JavaScript

2019-11-02 Thread Isiah Meadows
om what you imagined though, most importantly it doesn't > offer any declarations. > > kind regards, > Bergi > ___ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > > ___

Re: Modify Promise.all() to accept an Object as a parameter

2019-10-13 Thread Isiah Meadows
___ >> es-discuss mailing list >> es-discuss@mozilla.org >> https://mail.mozilla.org/listinfo/es-discuss >> > _______ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-dis

Re: Conditional await, anyone?

2019-10-09 Thread Isiah Meadows
adding new syntax for it. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Wed, Oct 9, 2019 at 3:08 AM Andrea Giammarchi wrote: > > I don't know why this went in a completely unrelated direction so ... I'll > try to explain again what is `await?` about. > &g

Re: Custom Elements in Templates

2019-09-24 Thread Isiah Meadows
ger act > like the custom element – xxx.Field isn’t defined. The script selecting it > is at “Window” level, so shouldn’t it “cast” correctly? > ___ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > -- - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Why globalThis instead of something intuitive like globalObject, systemGlobal, or globalEntity?

2019-09-21 Thread Isiah Meadows
If you look in the proposal's repo, they explain the rationale behind the identifier: https://github.com/tc39/proposal-global/ Here's a short summary: `globalThis` is the same value you get from evaluating `this` in the global scope of a sloppy mode script. This is subtly different than a "global

Re: A new proposal for syntax-checking and sandbox: ECMAScript Parser proposal

2019-09-16 Thread Isiah Meadows
Nit: Acorn's *output* is based on Esprima. Its code is *not* and hasn't been for a few years now. It started a fork of Esprima, but it wasn't long before it was rewritten the first time. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Mon, Sep 16, 2019 at 1:58 AM kai zhu

Re: A new proposal for syntax-checking and sandbox: ECMAScript Parser proposal

2019-09-14 Thread Isiah Meadows
rating an AST for tooling and generating an AST to execute. In the former, you want as much info as possible readily available. In the latter, you just want to have the bare minimum to compile to bytecode with relevant source locations for stack traces, and anything else is literally just unnecess

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

2019-09-10 Thread Isiah Meadows
k ends, >>>> unnecessary guards that force serialization in interface libraries just to >>>> cope with (and effectively negate) it, and API rate limiting. This feature >>>> teaches the best practice that the level of concurrency should be mindfully >>>> chosen. However, those who really want it can specify "concurrency >>>> items.length" or similar. >>>> >>>> *"What about async iterators?"* >>>> >>>> The feature should also be supported here: >>>> >>>> ```js >>>> for *async* (item of items *concurrency 5*) { >>>> // db.insert is an async function >>>> await db.insert(item); >>>> } >>>> ``` >>>> >>>> While the async iterator itself is still sequential rather than >>>> concurrent, frequently these can supply values considerably faster than >>>> they are processed by the loop body, and so there is still potential >>>> benefit in having several items "in the hopper" (up to the concurrency >>>> limit) at a time. >>>> >>>> -- >>>> Chief Software Architect >>>> Apostrophe Technologies >>>> Pronouns: he / him / his >>>> ___ >>>> es-discuss mailing list >>>> es-discuss@mozilla.org >>>> https://mail.mozilla.org/listinfo/es-discuss >>>> >>> ___ >> es-discuss mailing list >> es-discuss@mozilla.org >> https://mail.mozilla.org/listinfo/es-discuss >> > ___ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > -- - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: persisting large wasm-sqlite3 datasets in browser (beyond kv-storage)

2019-09-04 Thread Isiah Meadows
Not sure this pertains to the ECMAScript spec in any way. You may have better luck with WICG, because they are who deal with those specs - those are specific to the web, while JS is used in places where those might not even make sense (like IoT sensors). - Isiah Meadows cont

Re: Re: Async Class

2019-08-26 Thread Isiah Meadows
an `async constructor(...) { ... }` instead of an `async class`. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Mon, Aug 26, 2019 at 11:11 AM Dimitrian Nine wrote: > > Ok so much time has passed. I have learned more js. And created some > [wrapper][1] for my idea

Re: Modulo Operator %%

2019-08-17 Thread Isiah Meadows
BTW, that very example is something I cover in my proposal's introduction. It's also part of why I want an operator - this is one of the few times where spreading FUD *is* a good idea IMHO. https://github.com/isiahmeadows/proposal-divisor-dependent-modulo/ - Isiah Meadows cont

Re: Array.prototype.joinWith(iterable)

2019-08-15 Thread Isiah Meadows
it'd be fast.) I at one point had it in my list of wishlist proposals, but it somehow disappeared. I've since recreated it: https://github.com/isiahmeadows/es-stdlib-proposals/blob/master/proposals/array/interleave.md - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Thu, Aug 15

Re: Modulo Operator %%

2019-08-15 Thread Isiah Meadows
an operator as opposed to syntax for this. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Thu, Aug 15, 2019 at 3:58 PM Jordan Harband wrote: > > Static functions don't have the same risk as prototype functions; `Math.mod` > would make sense to add. > > One sug

Re: Modulo Operator %%

2019-08-15 Thread Isiah Meadows
on) that interprets `-a ** b` and `-a**b` *differently* in light of that (as `(-a) ** b` and `-(a ** b)` respectively). That's not a concern at all with most operators, so it doesn't apply to most new operator proposals. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Thu, Aug 15, 2019

Re: Modulo Operator %%

2019-08-14 Thread Isiah Meadows
a function for this kind of modulus operation, not an operator. That itself seems worth noting. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Tue, Aug 13, 2019 at 10:27 AM Michael Haufe wrote: > > I would prefer the syntax be ‘a mod b’ consistent with my wishlis

Re: Proposal: Typeof Trap

2019-07-29 Thread Isiah Meadows
). - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Sun, Jul 28, 2019 at 10:46 PM Ranando King wrote: > > On one hand, I agree with Jordan. Don't grief the language due to a bad 3rd > party API. Whether we accept it or not, a browser's API is a 3rd party API >

Re: Proposal: Typeof Trap

2019-07-27 Thread Isiah Meadows
return or store `document.all` ever. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Sat, Jul 27, 2019 at 5:20 PM Michael Haufe wrote: > > More than one case: > > > > > > var foo = f() > > typeof foo // object > > foo instanceof

Re: Re: Removing the space in `a+ +b`?

2019-07-11 Thread Isiah Meadows
ase taking advantage of something that is currently invalid. BTW, I'm no longer behind my suggestion, and was never strongly in favor of it to begin with. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Tue, Jul 9, 2019 at 2:50 PM ViliusCreator wrote: > > Lexer already see

Re: Removing the space in `a+ +b`?

2019-06-29 Thread Isiah Meadows
Just an update to you all: I'm only very weakly for this, and I'm okay to rescind this suggestion. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Fri, Jun 28, 2019 at 5:01 PM Waldemar Horwat wrote: > > On 6/28/19 8:41 AM, Isiah Meadows wrote: > > Currently, th

Removing the space in `a+ +b`?

2019-06-28 Thread Isiah Meadows
. Could the grammar be amended to include this production and make it evaluate equivalently to `a+ +b` AdditionExpression :: AdditionExpression `++` [no LineTerminator here] UnaryExpression -- - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com

Re: Re: Proposal: Selector/Select Expression

2019-06-28 Thread Isiah Meadows
, 2019 at 11:25 Isiah Meadows wrote: > Agreed in that it's not ambiguous - you have to disambiguate it with a > space for the same reason you have to use `a+ +b` instead of `a++b` in > minified code to avoid ambiguity when specifying `a + +b`. So `a?.b:.c` > would be invalid, b

Re: Re: Proposal: Selector/Select Expression

2019-06-28 Thread Isiah Meadows
_ >> es-discuss mailing list >> es-discuss@mozilla.org >> https://mail.mozilla.org/listinfo/es-discuss >> > ___ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > -- - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Re: Proposal: Selector/Select Expression

2019-06-28 Thread Isiah Meadows
ry operator would be ambiguous. >> >> ``` >> >> const contactSelector = true ? .contacts.email : .contacts.phone; >> >> ``` >> >> >> -- - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com ___

Re: Proposal Request

2019-06-27 Thread Isiah Meadows
Suggest it here, or if you prefer, you can also suggest it in IRC at #tc39 on Freenode. People from TC39 are usually present here, and you can also find them elsewhere, too. You can find more info here: https://github.com/tc39/ecma262/blob/master/CONTRIBUTING.md#new-feature-proposals - Isiah

Re: Re: Proposal: Selector/Select Expression

2019-06-27 Thread Isiah Meadows
Generalize this far enough, and you wind up with something not far from this: https://github.com/tc39/proposal-partial-application - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Wed, Jun 26, 2019 at 5:44 AM Michael Luder-Rosefield wrote: > > The more I read this pr

Re: Feature Request

2019-06-27 Thread Isiah Meadows
) are planning to adapt it, I feel it might be worth waiting for this stage-0 proposal to make it in in some form or another first, *then* pushing for language-level support of parallelism: https://github.com/rricard/proposal-const-value-types/ - Isiah Meadows cont...@isiahmeadows.com

Re: Re: What do you think about a C# 6 like nameof() expression for

2019-06-19 Thread Isiah Meadows
almost exclusively just quality-of-life improvements to developers, but it's not specific to IDEs or even static tooling. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Mon, Jun 17, 2019 at 8:28 PM guest271314 wrote: > > > > You have ignored the context from Jo

Re: Re: What do you think about a C# 6 like nameof() expression for

2019-06-19 Thread Isiah Meadows
), and only after falling back to the global scope would the value fall back to a dynamic lookup and test. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Sun, Jun 16, 2019 at 8:15 PM guest271314 wrote: > > > - If `y` is directly visible in scope and is neither a

Re: Re: What do you think about a C# 6 like nameof() expression for

2019-06-16 Thread Isiah Meadows
- If `y` is entirely undeclared, it should be a runtime `ReferenceError` in the same way it is when accessing undefined globals. So in your second example, I'd expect it to throw before even attempting assignment - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Sun, Jun 16, 2019 at

Re: Re: What do you think about a C# 6 like nameof() expression for

2019-06-15 Thread Isiah Meadows
> > > > What if user already has `nameof` function. > > 1. To maintain status quo we can user `nameof` function having priority > over newly introduced language feature. > > 2. OR we can use `typeof` syntax, e.g. `nameof msg.userName` (// returns > "userName&q

Re: Proposal: rest operator in middle of array

2019-06-07 Thread Isiah Meadows
need to have reference types or mixed types as keys. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Thu, Jun 6, 2019 at 2:22 PM kai zhu wrote: > > -1 for maintainability and debuggability > > 1. maintainability > if you want to extend the function with

Re: Proposal: syntactic sugar for extracting fields from objects

2019-06-05 Thread Isiah Meadows
}} ``` - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Tue, May 28, 2019 at 3:13 PM Григорий Карелин wrote: > > Here are another examples, where "destructuring picking" I suggest whould be > helpful. > ==1A Now (redux related) > ``` > function mapStateToProps

Re: RegExp `x` flag

2019-06-05 Thread Isiah Meadows
ond) foo()`. `new RegExp(multilineString)` *is* a valid fallback, something I already use today quite a bit, but I'd prefer to use one or the other consistently for static regexps. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Tue, Jun 4, 2019 at 12:36 AM kai zhu wrot

Re: RegExp `x` flag

2019-06-03 Thread Isiah Meadows
Let me clarify that previous message: I mean "newline restriction" in the sense that newlines are not permitted in regexp literals. A `/x` flag would make removing it practically required for it to have any utility. ----- Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On

Re: RegExp `x` flag

2019-06-03 Thread Isiah Meadows
I would personally love this (as well as interpolations in regexp literals). I do have a concern about whether removing the newline restriction creates ambiguities with division, but I suspect this is *not* the case. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Mon, Jun

Re: how many async-modules can js-app practically load?

2019-06-03 Thread Isiah Meadows
is itself enough to get in the way of things.) - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Fri, May 31, 2019 at 1:40 PM kai zhu wrote: > > > Oh, and yes, I've loaded upwards of 50-100 modules in development. 20 > modules is *easy* to achieve in sing

Re: how many async-modules can js-app practically load?

2019-05-31 Thread Isiah Meadows
If it's bundled by Rollup or Webpack into a single bundle, it's equivalent to a single

Re: how many async-modules can js-app practically load?

2019-05-24 Thread Isiah Meadows
to cache the request, not the result), but it's otherwise the same from 1km away. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Thu, May 23, 2019 at 10:49 AM kai zhu wrote: > > actually, i admit i don't know what i'm talking about. just generally > confused (through

Re: Re: Indexing HTML Attributes and Unique Indexes

2019-05-24 Thread Isiah Meadows
You'd have better luck asking for this feature in https://discourse.wicg.io. ES Discuss is about the JS language itself and the related ECMAScript spec, not the Web APIs that are implemented in most browsers, usually separately to the JS implementations themselves. - Isiah Meadows cont

Re: Proposal: native XML object support.

2019-05-20 Thread Isiah Meadows
My bad. I should've known that. :-) (I've looked *way* too deeply into the React/Redux ecosystem to have any sort of excuse on this one.) - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Wed, May 15, 2019 at 11:39 PM Jordan Harband wrote: > > (that's not react's c

Re: Proposal: Add new 'Matrix' object

2019-05-15 Thread Isiah Meadows
ultiplication` and `addition`. > > Thank you, > ___ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > -- - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com _

Re: Proposal: native XML object support.

2019-05-15 Thread Isiah Meadows
in a (for better or worse) > JSON-centric > world. > > —— Sandy > > ___ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > ___ > es-discuss mailing list > e

Re: Proposal: Symbol.inObject well-known symbol to customize the "in" operator's behavior

2019-05-12 Thread Isiah Meadows
th"' as non-existent > ``` > > > —Claude > _______ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > -- - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Proposal: Symbol.inObject well-known symbol to customize the "in" operator's behavior

2019-05-09 Thread Isiah Meadows
gt;> Those two examples seem to give to the `in` operator a meaning that it >> was not intended to have. The `in` operator is specifically meant to check >> whether a given property exists in a given object. >> >> Also, there already exists a way to customise the behavio

Re: Re: Actual WeakSet Use Cases

2019-04-28 Thread Isiah Meadows
} catch { return false } } } var object = Object.freeze({foo: true}) new B(object) console.log(B.isB(object)) // logs `true` ``` This may seem very odd, but it's consistent with the concept of private fields being sugar for weak maps. - Isiah Meadows cont

Re: Symbol.inspect

2019-04-05 Thread Isiah Meadows
e optional, but the HTML spec should require hosts to implement most modules within it. I've filed https://github.com/tc39/proposal-javascript-standard-library/issues/47 to elaborate on this further. ----- Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Thu, Apr 4, 2019 at 9:18 PM L

Re: Let async generators directly await an incoming promise

2019-04-01 Thread Isiah Meadows
Filed https://github.com/tc39/ecma262/issues/1497 to track this. Sounds to me like a spec bug. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Mon, Apr 1, 2019 at 7:00 AM Simo Costa wrote: > > Cur

Re: Proposal For A New Alternative Keyword To “this” For Classes

2019-03-18 Thread Isiah Meadows
UX workflows aren't all of JS. Classes exist for many more reasons than that, and 99% of my classes are for abstracting non-trivial business logic and ensuring *those* are easily testable, not directly UI/UX. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Sun, Mar 17

Re: Proposal For A New Alternative Keyword To “this” For Classes

2019-03-13 Thread Isiah Meadows
ith native private > fields, that's impossible. > > On Tue, Mar 12, 2019 at 10:39 AM Isiah Meadows > wrote: > >> @Ranando Minor nit: class fields can be purely implemented in terms of >> `defineProperty` (for public) and weak maps (for private - what's used >

Re: Proposal For A New Alternative Keyword To “this” For Classes

2019-03-12 Thread Isiah Meadows
lementation, may be having instance method/property >> references on the objects and having static method/property references on >> the prototype is the solution? >> >> On Tue, Mar 12, 2019 at 8:14 AM Isiah Meadows >> wrote: >> >>> I've done a little engine w

Re: Proposal For A New Alternative Keyword To “this” For Classes

2019-03-12 Thread Isiah Meadows
isting code or bring > dubious-to-no benefit. > > On Tue, Mar 12, 2019 at 3:06 AM john larson > wrote: > >> So in terms of implementation, may be having instance method/property >> references on the objects and having static method/property references on >> the p

Re: Name-spaced cross-realm objects

2019-03-11 Thread Isiah Meadows
Not a huge fan. This explicit encapsulation break could be done via an explicit bootstrapper that can send values across realms, and scenarios on the same realm can just use global state. Also, the utility seems a bit low IMHO. On Tue, Mar 12, 2019 at 00:39 Sultan wrote: > The following is

Re: Proposal For A New Alternative Keyword To “this” For Classes

2019-03-11 Thread Isiah Meadows
I've done a little engine work, and inline caches work by inline type maps based on the callee site. This *can* be used to reconstruct values + receivers, but only when the value is constant. It is not sufficient to ensure identity remains the same, and engines would still need a weak map to link

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

2019-03-11 Thread Isiah Meadows
JS numbers are specified to be in terms of IEEE-754 doubles, so tenths, hundredths, and so on cannot be precisely represented. [1] So there is no way to increase precision here beyond the above that Tab showed, assuming each of those operations are accurate to the bit. [1]:

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

2019-03-07 Thread Isiah Meadows
g `[...num]`. "Array to number" is just `+[...values]`, which evaluates to `Number(String([...values]))`. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Thu, Mar 7, 2019 at 7:29 PM guest271314 wrote: >> >> @guest When making a language proposal, th

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

2019-03-07 Thread Isiah Meadows
/"gimme teh codez" question. [2] [1]: https://oeis.org/A217626 [2]: https://stackoverflow.com/q/54433007/2693146 ----- Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Thu, Mar 7, 2019 at 6:28 PM Bob Myers wrote: > > There is already a very well thought out list

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

2019-03-07 Thread Isiah Meadows
to dispute it - they could just as easily ignore it and your proposal won't have a chance to be merged into the spec. You have to be the one to explain why it should be added. ----- Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Thu, Mar 7, 2019 at 7:09 PM guest271314 wrote: >

Re: Proposal: Duration

2019-03-04 Thread Isiah Meadows
is hard. [1]: https://www.iana.org/time-zones [2]: https://github.com/eggert/tz [3]: https://en.wikipedia.org/wiki/Calendar_date [4]: https://en.wikipedia.org/wiki/Gregorian_calendar [5]: https://en.wikipedia.org/wiki/Leap_second - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com

Re: Proposal: switch expressions

2019-03-03 Thread Isiah Meadows
ispatch still was listed as slower than switch/case across the board and roughly equal to dynamic string property dispatch. One last thing: could you *please* quit arguing semantics? - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Sat, Mar 2, 2019 at 4:57 PM Naveen

Re: Proposal: switch expressions

2019-03-02 Thread Isiah Meadows
r a little benchmark. And also, engines *won't* be able to optimize them generally, because there could be infinitely many type maps, and after about 200 or so types, the `switch` statement ends up *much* slower. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Sat, Mar 2, 20

Re: Proposal: switch expressions

2019-03-01 Thread Isiah Meadows
me a single method receiver, i.e. when it *has* to fall back to dynamic dispatch. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Fri, Mar 1, 2019 at 6:25 AM Naveen Chawla wrote: > > The entire renderers, cameras, meshes etc. hierarchy uses method inheritance > an

Re: Loose idea on "try import"

2019-03-01 Thread Isiah Meadows
Personally, I find this a *bad* idea. Top-level `await` in modules would solve this problem far more quickly and efficiently. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Fri, Mar 1, 2019 at 3:35 PM Ben Wiley wrote: > > Has anyone seen anything like this done in a

Re: Proposal: switch expressions

2019-02-28 Thread Isiah Meadows
* to be inherited to work.) - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Thu, Feb 28, 2019 at 12:40 PM Naveen Chawla wrote: > > I'm not sure that pattern matching handles deep levels of inheritance more > elegantly than inheritance itself. > > If there is a

Re: Proposal: switch expressions

2019-02-28 Thread Isiah Meadows
That's still something a lot of people *want* to see end up in the proposal - in fact, https://github.com/tc39/proposal-pattern-matching/issues/116 was filed by a TC39 committee member. I wouldn't dismiss the possibility of pattern matching *expressions* before then. - Isiah Meadows cont...@isia

Re: Proposal: switch expressions

2019-02-28 Thread Isiah Meadows
anyways - it covers more use cases and is all around more flexible, so I get more bang for the buck. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Thu, Feb 28, 2019 at 9:23 AM Naveen Chawla wrote: > > Hi David! > > Your last example would, I think, be better serve

Re: Proposal: switch expressions

2019-02-26 Thread Isiah Meadows
You're not alone in wanting pattern matching to be expression-based: https://github.com/tc39/proposal-pattern-matching/issues/116 - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Tue, Feb 26, 2019 at 1:34

Re: Proposal: throw null operator

2019-02-24 Thread Isiah Meadows
Not sure what the benefit is over just `if (value != null) throw value`, especially for this niche of a use case. On Sun, Feb 24, 2019 at 09:46 IdkGoodName Vilius < viliuskubilius...@gmail.com> wrote: > I am proposing a syntatic sugar, which would check if throw value is not > null, or not

Re: Proposal: switch statement multiple

2019-02-15 Thread Isiah Meadows
It's being considered, just indirectly through a more powerful feature: https://github.com/tc39/proposal-pattern-matching On Fri, Feb 15, 2019 at 23:02 Juan Pablo Garcia wrote: > I think it would be great if the switch statement allows multiple argument > > Example > Switch(a,b) > Case: 1,true >

Re: Proposal: `Object.isEmpty(value)`

2019-02-14 Thread Isiah Meadows
> > Or are JS engines actually doing this fast (like returning "virtual" > keys list for which they can tell .length fast and only actually reify > the keys themselves lazily)? > > Herby > > > On Wed, Feb 13, 2019 at 10:31 PM Isiah Meadows > <mailto:i

Re: Proposal: `Object.isEmpty(value)`

2019-02-14 Thread Isiah Meadows
I meant `true` for those - I had my conditions flipped. My bad. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Thu, Feb 14, 2019 at 8:55 AM Andrea Giammarchi wrote: > > > 1. If `value` is either `null` or `undefined`, it gracefully falls back to > >

Proposal: `Object.isEmpty(value)`

2019-02-13 Thread Isiah Meadows
`, this is the slow path, but you can still short-circuit when `ownKeys` returns an empty array. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: A way to fire logic at the end of completion of the current class method (regardless of super call order).

2019-02-09 Thread Isiah Meadows
I presume you've *never* written non-trivial server-side logic in Node. I find myself using classes *far* more often in Node than in the browser simply because it's more than just passing strings and object bags around. You've got caching, process management, and even sometimes task queues. The

Re: A way to fire logic at the end of completion of the current class method (regardless of super call order).

2019-02-09 Thread Isiah Meadows
than they would've gotten from an explicit `if (new.target === Subclass) this.init()` call at the end (which is basically what I want mod the exposed method). - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Sat, Feb 9, 2019 at 4:53 PM Jordan Harband wrote

Re: A way to fire logic at the end of completion of the current class method (regardless of super call order).

2019-02-09 Thread Isiah Meadows
and right. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Fri, Feb 8, 2019 at 1:22 AM #!/JoePea wrote: > > I many times find myself in cases where a base class wants to ensure that > logic is always fired after the current method's execution, so that for > examp

Re: returning non-Promise values from async functions and running them synchronously (or Promise.sync() idea)

2019-02-03 Thread Isiah Meadows
provide two separate entry points in the form of `Symbol.iterator` vs `Symbol.asyncIterator` methods. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Mon, Feb 4, 2019 at 1:43 AM Jordan Harband wrote: > > Typically, APIs that are sometimes sync and sometimes async are

Re: idea: Array.prototype.remove

2019-02-03 Thread Isiah Meadows
ter strings are another big exception. The reason I called mine `delete` instead of `remove` is to align with `Set.prototype.delete` and `Map.prototype.delete`, which operate similarly. [1]: https://github.com/isiahmeadows/es-stdlib-proposals/blob/master/proposals/array/delete.md - Isiah Mead

Re: returning non-Promise values from async functions and running them synchronously (or Promise.sync() idea)

2019-02-03 Thread Isiah Meadows
You could move the async part into a helper function and call that from a sync function you instead expose. I've used this trick more than once, and although it is a bit of boilerplate, it works well enough. On Sun, Feb 3, 2019 at 18:40 #!/JoePea wrote: > I often find myself enjoying async

Re: Proposal: Default object method

2019-01-28 Thread Isiah Meadows
Nit: you may need to reset the function's prototype. Also, `create` should probably be static. ;-) On Mon, Jan 28, 2019 at 01:46 Ranando King wrote: > Jordan's right. This one is best handled by a function. But if there is > some reason you need to create callable objects, it's still doable,

Re: NumberFormat maxSignificantDigits Limit

2019-01-24 Thread Isiah Meadows
For all here interested, you might want to follow this Twitter conversation I started. My theory is a subtle spec bug that copied the number instead of recalculating the formula. https://twitter.com/isiahmeadows1/status/108851744948878 - Isiah Meadows cont...@isiahmeadows.com

Re: NumberFormat maxSignificantDigits Limit

2019-01-20 Thread Isiah Meadows
I feel this is probably best asked at https://github.com/tc39/ecma402, since it seems to imply a potential spec bug. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Sun, Jan 20, 2019 at 2:31 PM Anders Rundgren < anders.rundgren@gmail.com> wrote: > On 2019-01

Re: Re: Proposal: enhanced case clause

2019-01-20 Thread Isiah Meadows
I'd say the best way is to just file an issue. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Sun, Jan 20, 2019 at 3:59 AM Sm In wrote: > Thank you for answer, I've checked thart proposal before. > As I know, proposal-pattern-matching contains guards(which c

Re: RegExp.prototype.count

2019-01-19 Thread Isiah Meadows
thing, I'd like it to be on the String prototype rather than the RegExp prototype, as in `str.count(/\n/)`. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com On Sun, Jan 20, 2019 at 12:33 AM kai zhu wrote: > > benchmarked @isiah’s while-loop test-case vs str.split vs str.r

PSA: You can find existing proposals at https://github.com/tc39/proposals

2019-01-19 Thread Isiah Meadows
. - Isiah Meadows cont...@isiahmeadows.com www.isiahmeadows.com ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Proposal: [Symbol.equals]

2019-01-18 Thread Isiah Meadows
Yeah, I agree. I'd suggest overloading `==`, but that'd risk serious web compat issues, especially if `null`/`undefined` aren't special-cased. I feel an `equals` instance method added to all builtins and an `Object.equals` attempting that method first before performing a shallow object comparison

  1   2   3   4   5   6   7   8   9   10   >