Why not all statement are expressions ?

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Mon May 7 13:39:52 PDT 2012


"deadalnix" <deadalnix at gmail.com> wrote in message 
news:jo9be0$mgh$1 at digitalmars.com...
>
> This won't work anyway. We are talking about language grammar here. If 
> made expression, statement would be of type void. Just like assert is.
>
> The question is why assert is an expression ? Why not other statement 
> don't follow the same pattern ?

Ok, I see what you mean. Maybe it's just because assert works like a 
function and functions are always expressions? Just a guess.




More information about the Digitalmars-d mailing list