Re: constructor, super, and data members issue

2018-09-03 Thread Jordan Harband
I'd say that defining a class directly in a class field is extremely niche, and by doing that, the user "should know what they've done" too. On Mon, Sep 3, 2018 at 3:44 PM, Ranando King wrote: > That scenario is intentional. I see no need to ban it. I would only want > to ban the confusing case

Re: constructor, super, and data members issue

2018-09-03 Thread Ranando King
That scenario is intentional. I see no need to ban it. I would only want to ban the confusing case of direct assignment in the outer class declaration. For cases where the user intentionally defines a class as you have done, they should know that what they've done will create a class that is

Re: constructor, super, and data members issue

2018-09-03 Thread Jordan Harband
`field = (function () { return class { }; }())` - how exactly would you propose banning creating a class inside class fields? On Mon, Sep 3, 2018 at 12:05 PM, Ranando King wrote: > I've been thinking about the problems around this some more. At first I > couldn't get past the dissenting

Re: constructor, super, and data members issue

2018-09-03 Thread Ranando King
Even with the suggestion I've made, I would still recommend keeping the post-super() initialization function. It would simply get all of the class fields from the prototype. Those that haven't already been initialized would be, guaranteeing that all fields that need to be initialized would be by

Re: constructor, super, and data members issue

2018-09-03 Thread Ranando King
I've been thinking about the problems around this some more. At first I couldn't get past the dissenting arguments from issue #123, but I've since come up with a solution that might work. What if: * Make it illegal to define a class directly on a class field in a class declaration. * Move the

Re: return =

2018-09-03 Thread Isiah Meadows
There is literally only one language I've seen that has anything like this, and it's Verilog, a hardware description language. (It's also of questionable utility, and it's restricted to just simulator-only constructs.) That's not an endorsement, more like the opposite of one. - Isiah Meadows

Re: return =

2018-09-03 Thread Peter Jaszkowiak
Wow that's fanatically disgusting. Please no. On Mon, Sep 3, 2018, 12:27 Bob Myers wrote: > To continue the "stupid idea of the day" series, I have often felt the > need to indicate a return value other than as part of a `return` statement. > > Perhaps this is my BASIC background--the dialect I

return =

2018-09-03 Thread Bob Myers
To continue the "stupid idea of the day" series, I have often felt the need to indicate a return value other than as part of a `return` statement. Perhaps this is my BASIC background--the dialect I used all those years ago allowed an assignment to the function name to pre-specify a return value,