Properties no longer work?
Stewart Gordon
smjg_1998 at yahoo.com
Tue Aug 1 13:01:57 PDT 2006
Bruno Medeiros wrote:
> Stewart Gordon wrote:
<snip>
>> I discovered quite recently that C supports such oddities as
>>
>> typedef int qwert(char*);
>>
>> (if I've got the syntax right), thereby defining qwert to be an alias
>> for a function of type int(char*). I've seen it in the LAM MPI
>> headers. But as you say, it seems useless - AFAIK the only thing you
>> can do with it is declare something of type pointer to qwert.
>
> I've quite recently discovered that D supports that as well!
> -> http://d.puremagic.com/issues/show_bug.cgi?id=270
> But ah... there is a use for such a typedef after all. I thought they
> could not be used in declarations at all, but forgot about declaring a
> pointer to it. But still I don't know if they are worth the strange syntax.
Can anyone think of a use case for this? I can't. Just declare a
typedef or alias of the function pointer type and be done with it. UIMS
there is nothing to be gained, besides empty complexity, by trying to
support such things.
Stewart.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d- s:-@ C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS-
PE- Y? PGP- t- 5? X? R b DI? D G e++++ h-- r-- !y
------END GEEK CODE BLOCK------
My e-mail is valid but not my primary mailbox. Please keep replies on
the 'group where everyone may benefit.
More information about the Digitalmars-d-learn
mailing list