Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: autoload with explicit path
- X-seq: zsh-workers 40340
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- Subject: Re: PATCH: autoload with explicit path
- Date: Thu, 12 Jan 2017 16:23:38 +0000
- Cc: Zsh Hackers' List <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=l9cvTGqhpWrAjK1 x+PHZyagWdYA=; b=V0FoOZU5ZdADByuIFvL1UAdvEtwNdpUw1Lp2h26CXw+IGvY yXkEYgWufBkrnz9ULyiPIurGPzn7d0Gmht5HpIe2An6+2LAci5RB/72KbNj6CbtO yAS7jXy/zg0ryxD2oUeczEAAOubK2BzASoxSE2bxRo+dvPEjLttJGvKvVebc=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=l9cvTGqhpWrAjK 1x+PHZyagWdYA=; b=MZdNKEU1jNdKA+ubTwZATtMw/H0bZ87KYymlU+K+2kKnd0 2Fqv6esUYPLf4XmD0tASeS/jsl8fvoy6TA+jbNN3iXTtF2d1QQYatlJ1SfhW/mMT M7LWpX49a+3SdRJFvCvSQUq1T9DLAcJ0W4QOVTnEhplR+SSypfs2paoE4Sc1U=
- In-reply-to: <20170112161651.46865f31@pwslap01u.europe.root.pri>
- 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: <CGME20170112125605eucas1p1b2539afbacec2d28d44c6fd73b0d50af@eucas1p1.samsung.com> <20170112125602.4fa64dc6@pwslap01u.europe.root.pri> <20170112154057.GA4899@fujitsu.shahaf.local2> <20170112155920.360ad5d7@pwslap01u.europe.root.pri> <20170112160921.GA8048@fujitsu.shahaf.local2> <20170112161651.46865f31@pwslap01u.europe.root.pri>
Peter Stephenson wrote on Thu, Jan 12, 2017 at 16:16:51 +0000:
> On Thu, 12 Jan 2017 16:09:21 +0000
> Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> > Of course it would be exactly the same machine code, but the source code
> > would be more robust against bugs. It's a lot harder to refer to the
> > wrong union member than to use the ->filename member without testing
> > PM_LOADDIR first.
>
> Hmm, feel free to write this if you think you can make things clearer;
> the bit setting will tell you what needs doing in each case. But I
> don't really see how it helps. If the bit happens to be set you will do
> it one way having exactly the same effect as if you did it the other
> way, so I don't see the gain.
The point is that the next time writes:
.
foo(shf->filename);
.
that won't compile, so he will be forced to take into account the two
distinct overloaded meanings. This might have prevented the bug you
fixed in 40335 from being written.
I'll see if adding it makes things clearer, will post if it does.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author