Standard way to supply hints to branches
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Wed Sep 11 11:58:40 UTC 2024
On 11/09/2024 11:53 PM, Manu wrote:
> On Wed, 11 Sept 2024 at 09:12, Walter Bright via Digitalmars-d
> <digitalmars-d at puremagic.com <mailto:digitalmars-d at puremagic.com>> wrote:
>
> On 9/9/2024 7:18 PM, Tejas wrote:
> > Hi, what are your views on the article linked below that
> discourages using
> > `[[likely]]` and `[[unlikely]]`?
> >
> >
> https://blog.aaronballman.com/2020/08/dont-use-the-likely-or-unlikely-attributes/ <https://blog.aaronballman.com/2020/08/dont-use-the-likely-or-unlikely-attributes/>
>
> Wow. The article eviscerates that design.
>
>
> Just to be clear; nobody I'm aware of has proposed that design, so I
> hope that's not your take-away.
>
> My proposal is to allow a hint attached strictly to control statements.
> (ideally as a suffix)
> It is easy to read, also easy to ignore (this is important), and
> extremely low-impact when marking up existing code: no new lines, no
> rearranging of code, purely additive; strictly appends to the end of
> existing control statements... these are very nice properties for
> casually marking up some code where it proves to be profitable, without
> interfering with readability, or even interfering with historic diff's
> in any meaningful way that might make it annoying to review.
Ideas forum proposal I wrote a little bit ago, based upon this article
for what it should not do.
https://forum.dlang.org/post/oezbkynwdhfqatsvufdm@forum.dlang.org
More information about the Digitalmars-d
mailing list