Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile())



On Fri, Oct 14, 2016 at 9:53 AM, Peter Stephenson
<p.stephenson@xxxxxxxxxxx> wrote:
> On Fri, 14 Oct 2016 06:36:25 +0000
> Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>> A 'char **' would become a 'struct metafied_t *', i.e., an array of
>> structs.
>
> I don't think arrays of unmetafied strings are that common, and in at
> least one case (the print builtin) having the length as part of the
> unmetafied_t structure, avoiding a parallel length structure, is
> beneficial.

I am more concerned about the large number of places where s[0][1]
would have to become s[0].v[1] than about whether the strings are
metafied or not.  Similarly *s++ and so on.

Including the even larger number of places where we'd have to convert
e.g. "if (!s)"  to  "if (!s.v)" because it's not possible to pass a
null struct by value.



Messages sorted by: Reverse Date, Date, Thread, Author