You are describing Perl's autovivification feature. Also possible (in that
syntax) for arrays and mixed object/array chains. I liked it, but many saw
it as a footgun. There was even a compile time module to turn off the
feature, if the coder wanted more caution. Having mentioned Perl I will
assume
const ɁɁɁ = () => { throw new Error('Method not defined'); };
Thomas Grainger
On 26 March 2018 at 06:26, Isiah Meadows <isiahmead...@gmail.com> wrote:
> Even in TypeScript, `never` (the type of functions that never return -
> throwing ≠ returning) is the subtype of *all* types,
You can convert an observable into an async iterator. You have to choose
between discarding or buffering uniterated items
On 23 Mar 2018 14:39, "Bob Myers" wrote:
> Could someone jog my memory about proposals for better syntax for
> observable mapping and subscribing, if any?
>
>
Is this sarcastic?
On 21 Mar 2018 12:58, "kai zhu" wrote:
> this is why let and const should *never* have been introduced. if we had
> stuck with just var, none of these petty-arguments and bickering among
> team-members/shops on scoping-styles that ultimately have *zero*
String.prototype.reverse() might break web compatibility, how about
String.prototype.turnyRoundy()?
On 17 Mar 2018 18:47, "Claude Pache" wrote:
>
>
> Le 17 mars 2018 à 19:29, Oriol _ a écrit :
>
> Be aware your code breaks pair surrogates,
I'm pretty sure this is Zones
On 11 Mar 2018 15:35, "Guy Margalit" wrote:
> Hey
>
> It's my first attempt to contribute to ECMAScript so would love your
> feedback if I better off change how I go about it.
>
> The problem I want to highlight is that besides argument passing
I think this is referring to cloning a WeakSet into another WeakSet
Thomas Grainger
On 9 February 2018 at 15:01, David Bruant <bruan...@gmail.com> wrote:
> Hi,
>
> My understanding is that cloning a WeakSet into a Set would remove all its
> properties related to security and
function f(x) { }
function g(y) { }
(f '.' g)(x); // z
```
Thomas Grainger
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
> Map's API could just go away and follow traditional Object assignment
> and existence checks:
>
> map[key] = value;
>
> // wish JS had a null-coalescing `?` operator like Coffeescript..
> if (map[key] !== undefined || map[key] !== null) { ... }
>
> It's totally legal in non-Node JS to have
Is this what you're thinking?
Array.prototype.nth = function (n){
if(n < 0){
return this[this.length -n];
} else {
return this[n];
}
}
Thomas Foster
@thomasfoster96
Ph: +61477808008
http://thomasfoster.co/
> On 23 Jan 2016, at 4:40 PM, kdex <k...@kdex.de> wrote:
>
Could this be achieved with decorators?
> On 19 Jan 2016, at 8:31 PM, 森建 wrote:
>
> Dear ES discuss subscribers,
>
> I'm Kenta Moriuchi,
> Department of Art and Information Design
> Kyushu University in Japan
>
> I propose `Protected State`.
>
> In ES2015:
>
> ```js
>
('Blue')
}
Thomas
> On 16 Dec 2015, at 10:02 PM, Andrea Giammarchi <andrea.giammar...@gmail.com>
> wrote:
>
> FWIW I think If an enum should hold a unique value either "symbol" or a new
> "enum" type, otherwise I think "number" would be easier
;
>> On Wed, Dec 16, 2015 at 3:20 AM, Thomas <thomasjamesfos...@bigpond.com>
>> wrote:
>> IMHO it'd be a huge mistake to not use symbols for enums.
>>
>> In my head this:
>>
>> const colours = enum {
>> Red,
>> Yellow,
>&g
> Proxies are shielded in two ways:
>
> - It is impossible to determine whether an object is a proxy or not
(transparent virtualization).
> - You can’t access a handler via its proxy (handler encapsulation).
Thomas
___
es-discuss mailing list
es-dis
> Is it possible to extend JavaScript syntax to support Swift style block
> syntax[1]?
>
> In Swift it's possible to omit return keyword
> ```
> reversed = names.sort( { s1, s2 in s1 > s2 } )
> ```
As you note below this is already possible in es6, and might I add, has much
more intuitive
return an array, it
might be useful. What are the typical use cases for this in other languages?
Also, should this just be a Reflect method or should it also be available on
Function.prototype?
Thomas
> On 6 Oct 2015, at 1:04 AM, Benjamin Gruenbaum <benjami...@gmail.com> wrote:
>
>> There's only one variation that's standard, and every browser is or
>> will soon be implementing that one.
>
> How can you said so? isn’t every Promise library pass A+ test considered
> standard?
There is a specific variation of promises in the ECMAScript standard which is
compatible with
> On 16 Sep 2015, at 12:39 AM, Claude Pache wrote:
>
> That doesn't make much sense, because regexpes are first-class objects, while
> template literals are syntax.
>
> The nearest equivalent of the string-to-regexp feature is the string-to-code
> conversion facility
9 AM, Andrea Giammarchi
>> <andrea.giammar...@gmail.com> wrote:
>> without using eval, discussed already months ago
>>
>>
>>> On Mon, Sep 14, 2015 at 6:03 AM, Thomas <thomasjamesfos...@bigpond.com>
>>> wrote:
>>> For those interested
you any plans to make the String.prototype.template function a proposal?
Thomas
> On 15 Sep 2015, at 1:52 AM, Andrea Giammarchi <andrea.giammar...@gmail.com>
> wrote:
>
> again, Function **is** better and different than eval, but I see this
> conversation is bringing noth
that you're not
confident about it being successful in that sense, but a built in function for
this trumps with and Function any day of the week.
Thomas
> On 15 Sep 2015, at 3:42 AM, Andrea Giammarchi <andrea.giammar...@gmail.com>
> wrote:
>
> nobody here raised the minima
I'd really like to use Template strings as a templating language, but unless I
include a lot of boilerplate code (export a template string wrapped in a
function from a file) or use eval after loading a file as a string it's pretty
much impossible.
Is there a simpler way to be doing this? Or
They would be whatever they are in the scope in which the template string is
evaluated.
Thomas
> On 14 Sep 2015, at 12:15 AM, Mark S. Miller <erig...@google.com> wrote:
>
>
>
>> On Sun, Sep 13, 2015 at 7:08 AM, Thomas <thomasjamesfos...@bigpond.com>
>
ing expression.
Thomas
* I'm aware that someone could still put something inside a template string and
do nasty stuff, but I'm not sure if that's a easily solved problem.
> On 13 Sep 2015, at 10:08 PM, Mark S. Miller <erig...@google.com> wrote:
>
>> On Sun, Sep 13, 2015 at 2:42 AM, T
and maintainability, it would be nice to keep the
templates separate from the code that uses them, and not have them inlined.
The best solution for my use case would be to have a special eval function
which would evaluate a normal string variable as if it was a template string,
in the current scope.
Thomas
> On 14 Sep 2015, at 1:38 AM, Alexander Jones wrote:
>
> Not exactly sure what you mean. But if you are you asking how
>
> ```js
> let template = 'this ${foo} and that ${bar}';
> // later...
> let output = String.evalTemplate(template, {foo: "thing", bar: "other
> thing"});
>
For those interested, this gist better shows what's being discussed:
https://gist.github.com/thomasfoster96/193e7c08aae499f810a1
Ron: Yes, that's already possible - but tagged template strings don't really
offer much of an advantage over a function as far as templating goes (IMHO).
Thomas
e person managing the list at
>> es-discuss-ow...@mozilla.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of es-discuss digest..."
>> Today's Topics:
>>
>>1. Re: Template strings as a
need to express an equation in text. It could be
made explicit that ** is a variant on 'exponentiation', but then maybe things
are deviating from being useful.
Thomas
On 27 Aug 2015, at 3:28 AM, Brendan Eich bren...@mozilla.org wrote:
Yehuda Katz cited an acronym taught when he was a wee lad
Exponentiation behave differently in
JavaScript to how it does elsewhere is going to be a constant source of bugs
and needing parentheses just to get the desire behaviour negates the whole
point of making it an operator vs a function.
Thomas
On 26 Aug 2015, at 1:49 AM, Allen Wirfs-Brock al...@wirfs
?
I'll also note here that the name property is typeset in the wrong font.
I'd have put this directly into the bugzilla instance, but I'm not
receiving the confirmation email when requesting a new account.
Regards,
Thomas Wood
___
es-discuss mailing list
list-noob here - I hope this gets threaded ok.
One of the pieces of awkward ES specification terminology has been the use of
the word Program as the name for a global top-level StatementList.
This, I think is what (the noun) program should be reserved for.
A ES Program is commonly only a
An issue popped up where V8 recently made everything in Error objects
non-enumerable. This was surprising to some apps. More surprising
is the insistence that this is required by the ES5 spec.
As a simplistic reader, when own property is mentioned here
15.11.2.1 new Error (message)
At 09:53 AM 4/8/2009, James Graham wrote:
Unless I am mistaken k is the current array index and n is the
initial array index, so the step Repeat while k n is a noop. I
presume it should say Repeat while k length
Yes, this was changed after the last errata.
15.4.4.14
34 matches
Mail list logo