Is there any real reason to use "const"?

Dennis dkorpel at
Mon Jan 24 18:17:38 UTC 2022

On Monday, 24 January 2022 at 17:55:39 UTC, H. S. Teoh wrote:
> If-statements are another trap waiting to happen... but so far 
> I've found it very hard to resist the conciseness of:

That's why I use 'Egyptian braces' with a 'cuddled else':

     if (x == y) {
     } else if (y == z) {
     } else {

Not the prettiest, but compact and safe.

More information about the Digitalmars-d mailing list