[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: typeof() creates elements in an array
From: |
Andrew J. Schorr |
Subject: |
Re: typeof() creates elements in an array |
Date: |
Thu, 30 Sep 2021 08:42:10 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Sep 30, 2021 at 01:09:11AM -0600, arnold@skeeve.com wrote:
> arnold@skeeve.com wrote:
>
> > > array lookup for a non-existent value looks like it has to create a new
> > > entry with a NODE value, and so I guess that has to have an explicit type
> > > at that moment. I don't think we have a notion of an untyped Node_val.
> >
> > We have Node_var_new, which is pretty close.
> >
> > I will look at this when I get a few minutes.
>
> I looked at this. It's possible to get the simple case of
>
> print(typeof(x[0])
> x[0][1] = "foo"
>
> to work, but the test suite then breaks pretty badly. I don't think
> it's worth the effort to make this really work. I will try to update
> the manual and clarify things some more.
Thanks for looking, but I suspected that it would be really difficult
in view of current internals. As a general language feature, it might be
nice to avoid locking down an array element type the moment it is first
referenced, but my sense is that it would be a big job to achieve this,
if it's possible at all.
Regards,
Andy
- typeof() creates elements in an array, Ivo Palli, 2021/09/27
- Re: typeof() creates elements in an array, david kerns, 2021/09/28
- Re: typeof() creates elements in an array, Andrew J. Schorr, 2021/09/28
- Re: typeof() creates elements in an array, arnold, 2021/09/29
- Re: typeof() creates elements in an array, Andrew J. Schorr, 2021/09/29
- Re: typeof() creates elements in an array, arnold, 2021/09/29
- Re: typeof() creates elements in an array, arnold, 2021/09/30
- Re: typeof() creates elements in an array,
Andrew J. Schorr <=
- Re: typeof() creates elements in an array, arnold, 2021/09/30
- Re: typeof() creates elements in an array, Andrew J. Schorr, 2021/09/30
Re: typeof() creates elements in an array, arnold, 2021/09/29