Re: Re: Definition mixins

2017-11-27 Thread dante federici
I'm having a little trouble parsing your proposed syntax. Can you formalize it a bit better? Am I write in guessing that it's more like sugar around bind and composition? Like, what's going on here? mixin obj, mixinFunc1 as method1: privateState, privateStateObj; I guess I'm wondering why

Re: Definition mixins

2017-11-18 Thread Bob Myers
> Unfortunately your second intervention isn't constructive either. Great, I'll bow out. Do let me know when you find your champion, at which point I'll follow further developments with keen interest. On Sat, Nov 18, 2017 at 11:48 PM, Raul-Sebastian Mihăilă < raul.miha...@gmail.com> wrote: > On

Re: Definition mixins

2017-11-18 Thread Raul-Sebastian Mihăilă
On Sat, Nov 18, 2017 at 7:53 PM, Bob Myers wrote: > I'm a JS programmer with more decades of experience than I care to > mention, and follow developments in language design closely. Frankly, I > don't understand what you are trying to accomplish or why support for it > needs to be

Re: Definition mixins

2017-11-18 Thread Bob Myers
I'm a JS programmer with more decades of experience than I care to mention, and follow developments in language design closely. Frankly, I don't understand what you are trying to accomplish or why support for it needs to be in the language. I strongly doubt I'm the only one. Rather than spending

Re: Definition mixins

2017-11-18 Thread Raul-Sebastian Mihăilă
On Sat, Nov 18, 2017 at 7:19 PM, Isiah Meadows wrote: > Protocols are not mixins - they're interfaces. They specify minimum > behavior required to implement (their primary focus), not simply extended > behavior. In particular, protocols and mixins would be more

Re: Definition mixins

2017-11-18 Thread Isiah Meadows
Protocols are not mixins - they're interfaces. They specify minimum behavior required to implement (their primary focus), not simply extended behavior. In particular, protocols and mixins would be more complementary than conflicting. On Sat, Nov 18, 2017, 04:48 Raul-Sebastian Mihăilă

Re: Definition mixins

2017-11-13 Thread Raul-Sebastian Mihăilă
On Mon, Nov 13, 2017 at 4:25 PM, T.J. Crowder wrote: > > There's an Edit link on messages on esdiscuss.org to let you fix issues > like that (e.g., when there's some esdiscuss.org-specific issue). > Cool, thanks! On Mon, Nov 13, 2017 at 4:48 PM, Isiah Meadows

Re: Definition mixins

2017-11-13 Thread Isiah Meadows
May I point out a few things: 1. The React community, who has for most of its existence used mixins and pseudo-proxies (they call them 'higher order components", but they're basically component proxies) is now moving to this thing called a "render prop", which is basically a function argument

Re: Definition mixins

2017-11-13 Thread T.J. Crowder
On Mon, Nov 13, 2017 at 12:25 PM, Raul-Sebastian Mihăilă < raul.miha...@gmail.com> wrote: > > The first version is based a hundred percent on concepts and > mechanisms already used in Ecma262. (Looks like esdiscuss.org > has an issue with percentages). There's an Edit link on messages on

Re: Definition mixins

2017-11-13 Thread Raul-Sebastian Mihăilă
On Mon, Nov 13, 2017 at 1:54 PM, Bob Myers wrote: > You should review the TypeScript approach to mixins: > https://www.typescriptlang.org/docs/handbook/mixins.html. > This seems very similar to the naive approach based on Object.assign that I mention in the first message of this

Re: Definition mixins

2017-11-13 Thread Bob Myers
You should review the TypeScript approach to mixins: https://www. typescriptlang.org/docs/handbook/mixins.html. But more generally, mixins are a very specific, opinionated OO design pattern. They are probably misused more often than not. If you think that big class hierarchies were brittle and

Re: Definition mixins

2017-11-13 Thread T.J. Crowder
On Mon, Nov 13, 2017 at 8:45 AM, Raul-Sebastian Mihăilă < raul.miha...@gmail.com> wrote: > > I wrote a first draft of the spec for the proposal... Could you add a "Motivations" section outlining why this is needed and what alternatives currently exist without new syntax? Separately, without yet

Re: Re: Definition mixins

2017-11-06 Thread Christopher Thorn
JSON is not a good serialization format for chess positions or games. We have FEN and PGN for those use cases. Implementing the "business logic" for chess is quite a lot more challenging than implementing FEN or PGN (de)serialization. Mixins are well-suited for writing chess software in

Re: Definition mixins

2017-11-05 Thread Michał Wadas
Saying "you don't need this if you follow my personal way of doing things" isn't helpful at all. Especially when these views are *controversial*. On 5 Nov 2017 4:27 pm, "kai zhu" wrote: the problem is that you chose to write the chess program in javascript, instead of say,

Re: Definition mixins

2017-11-05 Thread Raul-Sebastian Mihăilă
On Sun, Nov 5, 2017 at 5:27 PM, kai zhu wrote: > the problem is that you chose to write the chess program in > javascript, instead of say, python or c#. > Kai, you're off-topic. The topic is mixins, not chess games. Please refrain from disrupting this thread.

Re: Definition mixins

2017-11-05 Thread kai zhu
the problem is that you chose to write the chess program in javascript, instead of say, python or c#. why did you choose javascript? probably because you intend the chess program to be an online webapp. mixins, like classes, are inferior to plain json-objects for webapps. how do you intend to