Standard way to supply hints to branches

Walter Bright newshound2 at digitalmars.com
Fri Sep 13 08:19:09 UTC 2024


On 9/11/2024 12:46 PM, Timon Gehr wrote:
> 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.

I have no idea what the difference is, as the branch determines the program path.



More information about the Digitalmars-d mailing list