Re: the shadow knows

On Wed, Dec 7, 2011 at 11:32 AM, Rex Kerr <ichoran [at] gmail [dot] com> wrote:
> I don't know why I should have to bother repeating the type information if
> all I want to do is forward parameters to A's constructor.

Auxiliaries are second-class enough without syntactically excluding
them from consideration. Still, something in the spirit of this idea
would sure be nice. I hate having to mkae up names for batons I'm
passing between relay racers. They're batons! They're all just
batons! Stop trying to humanize them!

I didn't get the impression you had this in mind, but we could forward
all the auxiliaries which matched, which would actually be kind of
awesome because there's absolutely no way to do that at present. You
subclass something with five auxiliary constructors, you can write all
five of those constructors again and you can like it.

On Wed, Dec 7, 2011 at 12:05 PM, Paul Phillips wrote:
> I didn't get the impression you had this in mind, but we could forward
> all the auxiliaries which matched, which would actually be kind of
> awesome because there's absolutely no way to do that at present. You
> subclass something with five auxiliary constructors, you can write all
> five of those constructors again and you can like it.

That would be awesome indeed. My answer was going to be "Choose the primary constructor, of course, unless it has the wrong number or type of arguments"--the reason being that the primary contstructor is where vals/vars must be declared, and matching that type is most likely to lead to unintentional shadowing.

But copying all of them would be far more awesome. And possibly even a good idea.

I didn't get the impression you had this in mind, but we could forward
all the auxiliaries which matched, which would actually be kind of
awesome because there's absolutely no way to do that at present. You
subclass something with five auxiliary constructors, you can write all
five of those constructors again and you can like it.

On Wed, Dec 7, 2011 at 12:29 PM, Rex Kerr wrote:
> That would be awesome indeed. My answer was going to be "Choose the primary
> constructor, of course,

I did anticipate that answer, which is why I wrote "Auxiliaries are
second-class enough without syntactically excluding them from
consideration" to start. But it's not so bad, maybe we bumbled our
way toward a good idea.