Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Fwd: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile())
- X-seq: zsh-workers 39655
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Fwd: type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile())
- Date: Sat, 15 Oct 2016 11:35:10 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=tqEwP4c+ppbuWocuVNoguelccS/Xly7nyB4GTLZ5McA=; b=FHrRkRaXeh6u2rb63EUiyah82Vcjl3F5UudXFk6h5rNqlt7GOzv1MyptIeo/N5dFpL OFuTkrF8wI05pNxlUf/HjlwgPX8ghTSAY/0bq/qyvrt1bjvNfSwCYYn+8HhNUb5YSm4U Jzfn3s30k+T4biFfF+ON9CiA7KuZcAmJrX45raMw0D7iMQVzcvO0A6fEJaj0DN98Ad+S oT+JrWs8kkXlO/yHwSUqOjEwHpBHsUwRlD3ioD85vDaw/nIPlgFRPvNM4xQ+c7U40wWB yF78ZXhSpu9DWUKL5VfpZJ1Vg1KONXgXPYe43tLvj24dBIeoMejBsew3IO019bUlU4LB Q5EA==
- In-reply-to: <CAH+w=7bONQfKge=kWwFasKNXSu7510d8c+1aoYEeyUbozf_P7A@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVB=485r3nRz_pP3A-k-oq2pOp5qYUK7pE1VEApXb0pR1g@mail.gmail.com> <CAKc7PVDof_GEuoSv7pg8c1=spXfDkWopP5VR8dVHg-bxXVES1g@mail.gmail.com> <CAKc7PVCRtBBVONgiExopYYUv7x4-HN_QEYk-05aoqZihiCRgMw@mail.gmail.com> <CAH+w=7a7jc0Q2=M9aG5mttbazxfsHB-Cz=WwJzCvz_SdnbApRw@mail.gmail.com> <CGME20161011065321eucas1p22afaabbe1f17f26a1b3507619ed1d96f@eucas1p2.samsung.com> <20161011065105.GB16819@fujitsu.shahaf.local2> <20161013112251.329c0dbf@pwslap01u.europe.root.pri> <CAH+w=7ZArSYVkjcrbAmkeiWsmpiufbj9+DeNhORgKtYEXEkn7Q@mail.gmail.com> <20161014063625.GC11115@fujitsu.shahaf.local2> <37947.1476486298@hydra.kiddle.eu> <20161015083040.GA4462@fujitsu.shahaf.local2> <CAH+w=7bONQfKge=kWwFasKNXSu7510d8c+1aoYEeyUbozf_P7A@mail.gmail.com>
[My apologies if this has appeared before, I got an error the first
time it doesn't seem to have come back to me through the list yet.]
On Sat, Oct 15, 2016 at 1:30 AM, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>
> Does anyone have a way to get type checking that doesn't involve
> adding .v everywhere?
Wouldn't it suffice to use
typedef char *unmeta_t;
typedef unsigned char *meta_t;
(or the reverse if we believe we're mostly going to be working on
meta_t). If we do that and also enable the GCC warnings -Wtype-limits
-Wconversion -Wformat-signedness would we not get adequate verbosity
without changing pointer arithmetic and dereferencing?
I hadn't even considered all the places where using a struct would
change memory allocation strategy. Oof.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author