On Wed, Jul 19, 2017 at 01:30:56PM +0000, sontung via Digitalmars-d wrote:
[...]
>     if(int i = someFunc(); i >= 0)
>     {
>         // use i
>     }
> Thoughts on this sort of feature?

I've been wanting such a feature for a long time now. Though I'd propose
a different syntax:

        if ((int i = someFunc()) >= 0)
        {
                ...
        }


T

-- 
I've been around long enough to have seen an endless parade of magic new 
techniques du jour, most of which purport to remove the necessity of thought 
about your programming problem.  In the end they wind up contributing one or 
two pieces to the collective wisdom, and fade away in the rearview mirror. -- 
Walter Bright

Reply via email to