Thread overview
iftype
May 22, 2005
bobef
May 22, 2005
Walter
May 22, 2005
bobef
May 23, 2005
Craig Black
May 22, 2005
Ben Hinkle
May 22, 2005
I just thought this morning would't be something like

if (var istype int)

more reasonable than

iftype (var : int)


May 22, 2005
"bobef" <bobef_member@pathlink.com> wrote in message news:d6pg4l$1i12$1@digitaldaemon.com...
> I just thought this morning would't be something like
>
> if (var istype int)
>
> more reasonable than
>
> iftype (var : int)

But it isn't var:int, it's type:int.

Nevertheless, my dissatisfaction with iftype is it's a separate statement. I think you're right in that it ought to be an expression.


May 22, 2005
In article <d6phum$1j4m$1@digitaldaemon.com>, Walter says...
>
>
>"bobef" <bobef_member@pathlink.com> wrote in message news:d6pg4l$1i12$1@digitaldaemon.com...
>> I just thought this morning would't be something like
>>
>> if (var istype int)
>>
>> more reasonable than
>>
>> iftype (var : int)
>
>But it isn't var:int, it's type:int.
>

I meant it is variable type :)

>Nevertheless, my dissatisfaction with iftype is it's a separate statement. I think you're right in that it ought to be an expression.
>

This is my point too.


May 22, 2005
"bobef" <bobef_member@pathlink.com> wrote in message news:d6pg4l$1i12$1@digitaldaemon.com...
>I just thought this morning would't be something like
>
> if (var istype int)
>
> more reasonable than
>
> iftype (var : int)

what about the
 iftype ( foo bar : baz)
syntax? I've been using the simple form iftype(foo : baz) up to now but
keeping that general form would be nice.


May 23, 2005
A little off topic here, but I think that the static if and iftype (however it is implemented) are awesome features!  I am so impressed with the progress of D.  Good job, Walter!  Good job, D community!  Keep it up.

-Craig