typedef '?

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Wed Nov 20 09:50:14 PST 2013


On Wednesday, 20 November 2013 at 10:49:19 UTC, seany wrote:
> is typedef gone?
> http://forum.dlang.org/thread/aqsjjrtzfzslcopabqgs@forum.dlang.org?page=2
>
> so If I want to define a new type as typedef string[] 
> surrealNumber, then it does not work?

typedef was removed from the language, there were reasonable 
arguments for the type to act as a "base" or "child" type and 
could not satisfy both.

alias operates as the C typedef does, it just gives another 
symbol to refer to the same thing, generally better for complex 
type names than need simplified.


More information about the Digitalmars-d-learn mailing list