Standard way to supply hints to branches

Timon Gehr timon.gehr at gmx.ch
Wed Sep 11 19:46:13 UTC 2024


On 9/11/24 20:55, Walter Bright wrote:
> 
>> 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.
> 
> How is that materially different from [[likely]] annotations?

It's associated with the branch and not with the program path.

(This is assuming the ideas in the blog post about C++ [[likely]] are 
factually correct, I have not sought independent confirmation.)


More information about the Digitalmars-d mailing list