crapped in favor of
> async iteration with async iterators.
>
> On Tue, Mar 15, 2016 at 2:26 PM, Isiah Meadows <isiahmead...@gmail.com>
> wrote:
>
>> By the way, I think observables are getting more headway than async
>> generators.
>>
>> https://github.com/
By the way, I think observables are getting more headway than async
generators.
https://github.com/zenparsing/es-observable
On Mon, Mar 14, 2016, 16:01 Benjamin Gruenbaum wrote:
> I would be super surprised if I could use `var` everywhere _except_ async
> iteration.
>
> So
Oh, and closures being accessible outside of them also would have huge
memory implications. IMHO that's when you start just using traditional OOP,
and bind methods where necessary.
On Sun, Mar 13, 2016, 20:42 Gorgi Kosev wrote:
> Have you tried experimenting with babel to
Missed the list...
-- Forwarded message -
From: Isiah Meadows <isiahmead...@gmail.com>
Date: Tue, Mar 15, 2016, 07:42
Subject: Re: stable sort proposal
To: Vic9 <vic99...@yandex.ru>
What about the Timsort? It's used in Android's Java implementation, as well
as
Yeah...you got the intent, though. :)
On Mon, Mar 14, 2016, 14:16 Tab Atkins Jr. <jackalm...@gmail.com> wrote:
> On Fri, Mar 11, 2016 at 8:17 PM, Isiah Meadows <isiahmead...@gmail.com>
> wrote:
> > In my honest opinion, there's not much reason to just require the sort
In my honest opinion, there's not much reason to just require the sort to
be stable. Some engines have done this in the past, and the spec
technically allows it. At this point, stable sorts are about as fast as
unstable ones, both in theory and practice (wasn't the case 10 years ago
IIRC).
On
If I recall, it should be a primitive in the first two pairs I asked about.
If that's not the case, that's a bug in the spec.
https://bugs.ecmascript.org
On Thu, Mar 10, 2016, 01:57 Raul-Sebastian Mihăilă
wrote:
> But note that `this` is not a primitive (not even in
The thing is, I'd expect all of them to throw. I would rather that check be
placed on the `super` call than the constructor, or just wholly ignored,
with `this` being a primitive. That's IMHO an odd behavior for that edge
case. I know there exist reasons to return primitives from constructors,
but
So, what about these?
```js
// 1.
function Super() {}
class Sub extends Super {
constructor() { super(); return 3 }
}
// 2.
class Super {}
class Sub extends Super {
constructor() { super(); return 3 }
}
```
On Thu, Mar 10, 2016, 01:31 Raul-Sebastian Mihăilă
What about these? Presumably, both do?
```js
// 1.
function Super() { return 2 }
class Sub extends Super {
constructor() { super(); return 3 }
}
// 2.
class Super {
constructor() { return 2 }
}
class Sub extends Super {
constructor() { super(); return 3 }
}
```
On Thu, Mar 10, 2016,
een base class constructors and normal functions).
>
> On Thu, Mar 10, 2016 at 3:58 AM, Isiah Meadows <isiahmead...@gmail.com>
> wrote:
>
>> Classes aren't intended to be value type factories, so I find this
>> unlikely to change.
>>
>> On Tue, Mar 8, 2016, 15:
Classes aren't intended to be value type factories, so I find this unlikely
to change.
On Tue, Mar 8, 2016, 15:46 Raul-Sebastian Mihăilă
wrote:
> I see that in step 13 of the [[Construct]] method of ordinary functions (
>
-or-why-large-languages-explode-was-revive-let-blocks.
Not saying this is a bad thing to add, but I'm skeptical on how likely
it is to get accepted.
Isiah Meadows
m...@isiahmeadows.com
On Sat, Mar 5, 2016 at 5:57 AM, Bob Myers <r...@gol.com> wrote:
> Extended dot notation is a proposal
ferent proposal than CSP, which operates on a Realm
> level.
> ___
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
Isiah Meadows
m...@isiahmeadows.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Yeah, and those effectively nullify this, anyways.
On Fri, Mar 4, 2016, 12:55 Simon Blackwell
wrote:
> Not sure of the rationale; however, it looks like Chrome now supports
> something similar natively:
>
>
>
>
>
In my honest opinion, I don't see the benefit. Arrays are the only
structure you can even do that in. And ES3 elision elements don't exist in
strict mode.
As for unused arguments, I usually just see the normal arguments for the
interface, some of which just happen to be unused. I'd rather know
Oh. I didn't realize that.
On Thu, Mar 3, 2016, 00:08 Kevin Smith wrote:
>
> I thought `typeof (class {}) === "function"` as well. And classes, to my
>> knowledge aren't callable.
>>
> Oh they are, they just throw when you call them : )
>
>
>
I thought `typeof (class {}) === "function"` as well. And classes, to my
knowledge aren't callable.
On Wed, Mar 2, 2016, 10:09 Mark S. Miller wrote:
> We maintain the invariant that the typeof of an object is stable -- it
> never varies over time. An object is callable iff
I'm interested in where the (stage 1?) proposal is as well.
On Mon, Feb 22, 2016, 11:38 Bradley Meck wrote:
> how will people distinguish `do ... while` from `do` expressions? I tried
> to find the exact grammar but couldn't after a bit of searching.
>
> For example in
ic, I feel swapping the global is potentially
dangerous, but you should hopefully know what you're doing if you do.
On Mon, Feb 22, 2016, 09:04 Coroutines <corouti...@gmail.com> wrote:
> On Mon, Feb 22, 2016 at 4:07 AM, Isiah Meadows <isiahmead...@gmail.com>
> wrote:
> > FY
dynamic scoping is
extremely hard to optimize and it's no longer obvious what variables
are defined in that block (static analysis no longer works).
As for the global scope, I'll refer you to the System.global proposal:
https://github.com/tc39/proposal-global
Isiah Meadows
m...@isiahmeadows.com
On Mon
Would it be possible to just define functions with an offset of exactly N
bits before, with tail calls having a separate entry point than regular
calls? Tail calls are already determined statically by spec, so you could
add/subtract N bits to the code you generate for a function call in
optimized
. Miller <erig...@google.com> wrote:
> What are the GC semantics specified for DOM? How are these observable?
>
>
> On Tue, Feb 16, 2016 at 7:04 PM, Isiah Meadows <isiahmead...@gmail.com>
> wrote:
>
>> I know this is only tangentially related, but I just
I know this is only tangentially related, but I just remembered weak refs
are required for a fully conforming DOM implementation because of their GC
semantics. I feel this is relevant with the semi-recent DOM-in-JS efforts.
On Tue, Feb 16, 2016, 20:24 Allen Wirfs-Brock
I believe Babel uses a modified Regenerator fork that only differs enough
to work with Babel, and is otherwise kept as in sync as possible.
On Mon, Feb 8, 2016, 22:30 Logan Smyth wrote:
> Joe, if you have a specific example, feel free to file an issue and I can
> take a
There is kind of a `do`-like syntax for Promises: async functions. To
borrow Tab's example:
```js
let finalPromise = (async () => {
let x = await promiseA
let y = await promiseB
let c = f(a, b)
return g(a, b, c)
})()
// or in parallel
let finalPromise = (async () => {
let [x, y] =
b 9, 2016 at 10:28 PM, Isiah Meadows <isiahmead...@gmail.com>
> wrote:
> > let finalPromise = (async () => {
> > let x = await promiseA
> > let y = await promiseB
> > let c = f(a, b)
> > return g(a, b, c)
> > })()
>
> I think it's import
I think that these methods should exist in iterator prototypes, with the
native iterators subclassing something like Iterator. Object.entries and
Object.values should return iterators that inherit these methods. Such
wrapper libraries are already coming out, and making existing arrays lazily
gt;
> On Friday, February 5, 2016, Isiah Meadows <isiahmead...@gmail.com> wrote:
>
>> I think that these methods should exist in iterator prototypes, with the
>> native iterators subclassing something like Iterator. Object.entries and
>> Object.values shoul
I'd agree that we don't need `Promise.p.wait`, but I think eventually, ES
is going to need a spec for an event loop. Or at least an interoperable
spec agnostic of runtime should be created somewhere, like the eventual
module loader.
On Thu, Feb 4, 2016, 19:20 Jan-Ivar Bruaroey
If this says anything, both CoffeeScript and LiveScript implement this
operator. I'm neutral on the proposal, though.
On Sun, Jan 24, 2016, 16:15 kdex wrote:
> Just a quick idea: The range operator could also be used for non-numeric
> ranges:
>
> ```js
> let latin = ["a" ... "z"];
As if that weren't the case with async arrow functions with a parenthesized
parameter list? I know that takes potentially an expression to
differentiate the two.
On Fri, Jan 15, 2016, 12:19 Gary Guo wrote:
> Note that this can possibly complicate the parser as additional
* as 3dIsCool from '3d-is-cool'
```
Isiah Meadows
m...@isiahmeadows.com
On Tue, Jan 26, 2016 at 3:45 PM, Paul Tyng <p...@paultyng.net> wrote:
> No it does not compete with the string literal version (see my proposal, no
> quotes), its an identifier only. 3d-is-cool is not a valid i
Isiah Meadows
m...@isiahmeadows.com
On Tue, Jan 26, 2016 at 4:58 PM, Caridy Patiño <car...@gmail.com> wrote:
> ```
> import fs;
> import "fs";
> ```
>
> too confusing :/
I would have to agree. In LiveScript, you have to do a standard
`require` call if all y
A use I thought up (although I got lazy and abandoned it later) was an
`exec` template tag, for executing commands. Or, and this just came off the
to of my head, you could use it as a vdom library as almost like a Lisp
reader macro:
```js
n`.form-ctrl`(
n`input#input`("input"),
rquoise'}
> let content = xjs`hello`
> let el = xjs`
>
> ${content}
>
> `
> ```
>
> It could be compiled statically as well as have a runtime template-tag
> implementation.
>
> On Wed, Jan 13, 2016 at 12:05 AM, Isiah Meadows <isiahmead...@gmail.com>
That link details other reasons, such as tooling.
On Wed, Jan 13, 2016, 18:11 Isiah Meadows <isiahmead...@gmail.com> wrote:
> Problem is: your idea has already been tried and found to be pretty slow.
> React devs did briefly consider this, but found that it had fundamental
> sp
That's almost implementing its own runtime system just to emulate operator
overloading, to be honest.
On Mon, Dec 28, 2015, 17:10 /#!/JoePea wrote:
> I just read this interesting article:
> http://www.2ality.com/2011/12/fake-operator-overloading.html?m=1
>
> Wow. What
One use case is where try-catch statements are required. I've had plenty of
these, and it's either declare the variable ahead of time, or wrap in a
IIFE.
Another use case: early returns and complex logic. This is pretty nice when
you're working with a complex set of conditions for a polyfill. I
; Sidebar: thanks to Isiah Meadows, the FBS proposal now also supports
> constructor wrapping via the `::new` syntax:
>
> let factory = SomeClass::new;
>
>
>
> On Mon, Dec 14, 2015 at 9:00 AM Marius Gundersen <gunder...@gmail.com>
> wrote:
>
>> Do we really ne
Question: does `x |> f(y)` desugar to `f(x, y)`, `f(y, x)`, or `f(y)(x)`?
On Sat, Dec 12, 2015, 12:17 Gilbert B Garza wrote:
> Ah yes, you are correct, it would need to be a special case as I wrote it.
> This version should work instead:
>
> ```js
> // Assume
bga...@gmail.com> wrote:
> `x |> f(y)` desugars to `f(y)(x)`
>
> On Sat, Dec 12, 2015 at 2:55 PM, Isiah Meadows <isiahmead...@gmail.com>
> wrote:
>
>> Question: does `x |> f(y)` desugar to `f(x, y)`, `f(y, x)`, or `f(y)(x)`?
>>
>> On Sat, Dec 12, 2015, 12:17
ase
> (https://whatwg.github.io/loader/#resolve-export), it is also a SyntaxError
> :)
>
> Jon: yes, it might be a redundant error, I will investigate more.
>
> /caridy
>
>
> On Dec 9, 2015, at 10:11 PM, Isiah Meadows <isiahmead...@gmail.com> wrote:
>
> It has to do with
t; es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
--
Isiah Meadows
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
change. Your consumers will thank you for it.
>>
>> Kind regards,
>> Bergi
>>
>> ___
>> es-discuss mailing list
>> es-discuss@mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>
>
>
> _
ng stored in an
ArrayBuffer is to have it encoded like a C string (er... `char*`).
>
> -Boris
>
> ___
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
--
Isiah Meadows
_
With that syntax, I'm not even sure it's necessary. It's not much more
concise than a list of 2-tuples. Don't quite see the benefit the other than
a few characters.
On Sat, Nov 28, 2015, 22:22 Tab Atkins Jr. wrote:
> On Thu, Oct 29, 2015 at 6:23 PM, Alexander Jones
> "icosahedron"];
> ```
>
> I think it would also make sense to allow `...` to include the results of
> iteration over some other iterable.
>
> ```
> let nums = [2, 3, 4];
> let setOfNums = Set#[1, 2, 3, ...nums, ...range(20, 50)];
> ```
>
> Cheers
&g
I like the idea of the #{} syntax working without a required type. But
here's my opinions:
1. It should automatically [[Construct]]. I don't see any other reason why
it shouldn't.
2. I don't like the idea of an `->` operator which does that. Also, is `a
-> b -> c` equivalent to `[a, b, c]` or
I haven't been able to find much talk on the value types proposal lately.
What's the status of it?
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
There's plans for such integration eventually in Web Assembly circles.
On Mon, Nov 16, 2015, 02:59 罗勇刚(Yonggang Luo) <luoyongg...@gmail.com> wrote:
> The Loader spec doesn't specify how to interop with native modules C/C++
>
> On Sun, Nov 15, 2015 at 6:47 AM, Isiah Mea
I see that as a good idea, but I also see it as similar to the Loader spec
- separate from ECMAScript itself. This is in large part because of the in
progress Web Assembly, and we need to have clean, native interop with that.
On Sat, Nov 14, 2015, 11:51 罗勇刚(Yonggang Luo)
With regards to breaking old code, even breaking 0.001% of sites is far too
many for JS. Believe it or not, for similar reasons, __proto__ was
un-deprecated and standardized. And `contains` was changed to `includes`,
because a library popular in the past broke, and a significant number of
their
to defeat some of the readability
> benefit.
Not to mention it would be pretty slow. That's going to be creating a
closure each call. Engines still struggle with making closures fast.
It's non-trivial at runtime to create a closure that's performant.
>
>
>
-with-multiple-arguments>
-with-multiple-arguments
<https://github.com/mindeavor/ES7-pipeline-operator#functions-with-multiple-arguments>
On Tue, Nov 10, 2015 at 12:52 PM, Isiah Meadows <isiahmead...@gmail.com>
wrote:
Inline
On Tue, Nov 10, 2015 at 12:52 PM, Kevin Smith <z
It's using an ES7 proposal, and it's a method bound to the instance.
On Tue, Nov 10, 2015, 18:58 Rick Waldron wrote:
> On Mon, Nov 9, 2015 at 8:45 PM JD Isaacks wrote:
>
>> Considering the proposals for both concise methods and the bind operator
>> I
Is there a reason why escapes like that in the title shouldn't evaluate to
keywords? To be honest, it's bad style, but I don't get how it would be
breaking the Web.
On Mon, Nov 9, 2015, 12:05 Allen Wirfs-Brock wrote:
>
> On Nov 9, 2015, at 6:55 AM, Andreas Rossberg
The problem with using the RegExp constructor is that it is never cached by
the engine. As a literal, engines usually internalize them, speeding up
matches very quickly.
On Fri, Nov 6, 2015, 14:24 C. Scott Ananian wrote:
> On Fri, Nov 6, 2015 at 1:20 PM, Brian Terlson
>
From:* es-discuss [mailto:es-discuss-boun...@mozilla.org] *On Behalf Of
> *Isiah
> Meadows
> *Sent:* Friday, November 6, 2015 4:36 PM
> *To:* C. Scott Ananian <ecmascr...@cscott.net>; Brian Terlson <
> brian.terl...@microsoft.com>
> *Cc:* es-discuss@mozilla.org
&
oko...@gmail.com>
wrote:
> On Wed, Nov 4, 2015 at 6:19 PM, Isiah Meadows <isiahmead...@gmail.com>
> wrote:
>
>> Would this be possible with a mixture of weak references and weak
>> collections?
>>
>
> I don't think so - the only potential implementation
Lol... I feel I'm in an insane minority that can work relatively
productively in Java 7 and Haskell both.
Of course, I have a preference, but that preference lies around that of
OCaml and Clojure. It's more the expression-based, impure functional
languages that I'm most productive in. Observing
I'm neutral.
On Tue, Nov 3, 2015, 15:43 Matthew Robb <matthewwr...@gmail.com> wrote:
> Isiah, could you elaborate some? I can't quite tell if you are expressing
> support for my suggestion or not. Thanks!
> On Nov 3, 2015 12:13 PM, "Isiah Meadows" <isiahmead...@gma
observed object, the store. That store can then emit a list of
changes to be resolved with the views.
What do you all think?
On Tue, Nov 3, 2015, 22:32 Isiah Meadows <isiahmead...@gmail.com> wrote:
> There's a reason Object.observe is async: it prevents you from changing
> how the va
There's a reason Object.observe is async: it prevents you from changing how
the value is first assigned, so it can't work like a proxy. And question:
how does it let you see hidden closures?
On Tue, Nov 3, 2015, 18:28 Coroutines wrote:
> On Tue, Nov 3, 2015 at 3:22 PM,
oxies. This just makes a common case
easier.
On Tue, Nov 3, 2015, 23:10 Coroutines <corouti...@gmail.com> wrote:
> On Tue, Nov 3, 2015 at 7:33 PM, Isiah Meadows <isiahmead...@gmail.com>
> wrote:
> > There's a reason Object.observe is async: it prevents you from changing
>
Proxies can do a better, more thorough job of breaking encapsulation.
```js
var log = [];
String = new Proxy(String, {
construct(target, newTarget, args) {
log.push(args);
return Reflect.construct(target, newTarget, args);
}
});
(function () {
var s = String;
var private =
, Nov 4, 2015, 01:17 Coroutines <corouti...@gmail.com> wrote:
> On Tue, Nov 3, 2015 at 10:08 PM, Isiah Meadows <isiahmead...@gmail.com>
> wrote:
> > Proxies can do a better, more thorough job of breaking encapsulation.
> >
> > ```js
> > var log = [];
> &
y. If the implementation
> really wants an Array to work on internally, they can simply call
> `Array.from` with little cost. But if they want an Immutable.List they can
> have that instead without ever seeing an actual Array. (The Symbol.fromHash
> method is just Symbol.literalOf as I
It's visually ambiguous, though. I really don't want to be reading
`foo..bar()` and `1..toString()` in the same file. They look the same, but
mean two completely different things.
In a language that has this feature, I almost never use it, anyways, unless
I'm interacting with the DOM. And even
Ignore that last email...misremembered the context.
On Fri, Oct 30, 2015, 06:06 Isiah Meadows <isiahmead...@gmail.com> wrote:
> It's visually ambiguous, though. I really don't want to be reading
> `foo..bar()` and `1..toString()` in the same file. They look the same, but
> mean
Observable effect doesn't mean same process. Granted, the case with a
number literal is very obscure, anyways, so I'm not that worried about it.
On Fri, Oct 30, 2015, 06:20 Claude Pache <claude.pa...@gmail.com> wrote:
> Le 30 oct. 2015 à 11:11, Isiah Meadows <isiahmead...@gmail.
It's visually ambiguous. I'd rather not read `1..toString()` and `foo..bar`
in the same file. Not with greatly differing meanings.
On Thu, Oct 29, 2015, 19:29 Claude Pache wrote:
>
>
> > Le 30 oct. 2015 à 00:07, Waldemar Horwat a écrit :
> >
> >> On
1. `foo?.3:.5` should be unambiguously `foo ? 0.3 : 0.5`, because `3` is a
number, not an identifier. `foo?.3` in any other context should be a syntax
error. It's also inconsistent with array access otherwise.
2. I wouldn't have a problem with `object?.[prop]`, since that's only one
character
Why not make it desugar to a direct function call with a single array of
pairs? It's so parsed as a regular object, so shorthands can still be used.
`Map#{foo: 1, bar: 2, 3: "baz"}`
`Map[Symbol.fromHash]([[foo", 1], ["bar", 2], ["3", "baz]])`
`Object#{foo: 1, bar: 2, 3: "baz"}`
I strongly oppose. I already write a ton of code that relies on that
throwing, using that for testing purposes. I'd rather something throw
violently than to silently fail in an unexpected, potentially seemingly
unrelated place. Not even pure functional programming can act as a safety
net for
I would be inclined to agree.
On Tue, Oct 27, 2015, 09:58 Федор Неживой wrote:
> Yes, Isiah is right about the soul of this proposal.
> Its a mostly a draft now, so yes this could be described better. If anyone
> can help me with the right description I would be happy to
I think this could be implemented with no regard to the function
implementation, which would treat functions with and without a lexical
`this` identically.
@Caitlin I have similar doubts. Also, I don't particularly like the look of
the `#` syntax. It looks too Perl-ish.
On Mon, Oct 26, 2015,
itializations, but only function
definitions.
2. It becomes non-obvious when functions are called, which can become
quickly problematic when state is involved. And JS uses state much
more frequently than most other functional languages (it's more OO
than functional, to be honest).
>
cates should try that approach
> first and see how far it gets. After all, that's where F.p.bind came from.
>
>
>
>
> On Mon, Oct 26, 2015 at 4:35 AM, Claude Pache <claude.pa...@gmail.com>
> wrote:
>
>>
>> > Le 26 oct. 2015 à 03:59, Isiah Meadows <isiahmead.
up Function.prototype.bind for classes, as assumptions can
be made.
--
Isiah Meadows
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
I think the main debate here is ergonomics. And by the way, since most
descriptors simply replace the `value` property (especially most that are
generic functional utilities), it could just as easily be made to deal with
both. I already make most of my descriptors that way now, so they can be
without exploding the number of
>>>> rules which must be remembered in order to use that feature.
>>>>
>>>>
>>>> ___
>>>> 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
>>
>
>
> ___
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
--
Isiah Meadows
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
havior
(in which I need to file an ESLint bug), or is this a V8 bug?
--
Isiah Meadows
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
3]) console.log(i)` will print out
> what you expect, since it properly rebinds per iteration.
>
> On Sat, Oct 17, 2015 at 11:09 PM, Isiah Meadows <isiahmead...@gmail.com>
> wrote:
>>
>> I was toying around with for-of loops in Node 4.0, and I ran into the
>>
obably to
>> mysterious. Even operator-like functions without an actual operator assigned
>> would make sense I think so no reason not to include pow. A general purpose
>> casting operator/func would be good I think but not sure if there is a point
>> to specialized ones just t
using symbol keys on a default-exported object or using unregistered symbols
> as export bindings (if this were even possible).
>
>
> ___
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
t;>
>>>>> ```js
>>>>> const a = [1, 2, 3]
>>>>> .map(square)
>>>>> .forEach(x => console.log(x))
>>>>> .map(plus1)
>>>>> .reduce(add);
>>>>> ```
>>>>>
>>>>> Unfortunately, this does not work as `forEach` returns `undefined`. I
>>>>> now have
>>>>> to comment out all the code below it. Having the _plug and play_
>>>>> behaviour for
>>>>> `forEach` would be very convenient.
>>>>>
>>>>> ___
>>>>> 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
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
yle and not new style?
>
>
> ___________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
--
Isiah Meadows
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
What about a `tap` function similar to Bluebird's `tap` function for its
promises?
I frequently write a `pipe` function that deals with this common case (with
arrays, but frequently promises and other monadic structures as well).
```js
// Complete transparent wrapper
function pipe(f) {
What should `this` be in class `B`? The value of `object` or an instance of
`B`? It's an edge case, but could simplify my code a little if it's the
former.
```js
const object = {}
class A {
constructor() {
return object
}
}
class B extends A {
constructor() {
super()
The main reason I don't use it is because I have bad experiences with
transparent currying in dynamic languages. It'll be one of those things I
almost never have the use case for. Kinda like SIMD and Math.imul. YMMV
On Fri, Oct 16, 2015, 15:27 Jeremy Darling wrote:
>
Oct 16, 2015, 14:43 Tab Atkins Jr. <jackalm...@gmail.com> wrote:
> On Thu, Oct 15, 2015 at 11:12 PM, Isiah Meadows <isiahmead...@gmail.com>
> wrote:
> > I like the idea, but could the function names be made a little
> > shorter? I'd like to at least save some characters
ual operator
> assigned would make sense I think so no reason not to include pow. A
> general purpose casting operator/func would be good I think but not sure if
> there is a point to specialized ones just to numbers, strings, and whatnot.
>
> On Fri, Oct 16, 2015 at 2:39 PM, Isiah Meado
y.monda...@gmail.com>
>>> wrote:
>>>>
>>>> It would be really cool to have syntax to curry functions built into the
>>>> languages. Something like...
>>>>
>>>> ```js
>>>> curry function add(a, b) {
>>>> return a + b
but I just
> want to be sure this is it or if there are more obvious/profound
> reasons concerning modules' system, syntax or philosophy that prevent
> this.
> _______
> es-discuss mailing list
> es-discuss@mozilla.org
> https://
` seems far safer than `Math.>` or just `>`
>> but I'd vote for `Math.greaterThan` as being the best name. Saving a couple
>> letters of typing isn't worth the price of hours more debugging.
>>
>> ___
>> 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
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
An npm package (not mine): https://npm.im/curry
Another simple implementation, ES3-compatible:
```js
function curry(f) {
function curried() {
if (arguments.length >= f.length) {
return f.apply(this, arguments);
} else {
var args = []
for (var i = 0; i <
;
> ___
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
--
Isiah Meadows
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
with well-known
> solutions. The only real problem is:
>
> let f = (-)
>
> Is this unary or binary `-`?
>
> On 13 October 2015 at 08:06, Isiah Meadows <isiahmead...@gmail.com> wrote:
> > +1 for operators as functions (I frequently is them in languages that
> h
Steve, I have little problem with whatever ends up the case, as long as
it's shorter than `(x, y) => x + y`. The current idea was inspired by
Swift's `list.sort(>)` and `list.reduce(0, +)`.
On Tue, Oct 13, 2015, 12:34 Steve Fink <sph...@gmail.com> wrote:
> On 10/12/2015 11:06 PM
701 - 800 of 945 matches
Mail list logo