Thread overview | |||||
---|---|---|---|---|---|
|
October 12, 2003 struct ctors | ||||
---|---|---|---|---|
| ||||
Is there a good reason why we can't have ctors/dtors on structs? I think they'd be extremely useful, and am currently stymied on a technique I wanted to use because of this. |
October 12, 2003 Re: struct ctors | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew Wilson | I believe the given reason is that it would make the compiler implementation more complicated, and would complicate exception handling. I know one of the design goals of D is a simple implementation, but this seems like a cop-out to me. Sean "Matthew Wilson" <matthew@stlsoft.org> wrote in message news:bmafdi$2u7n$2@digitaldaemon.com... > Is there a good reason why we can't have ctors/dtors on structs? > > I think they'd be extremely useful, and am currently stymied on a technique > I wanted to use because of this. |
October 12, 2003 Re: struct ctors | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | I can see the point of a simple compiler implementation up to a point, but when it comes to hobbling the language, it's gone beyond its purpose. Is it better to have a powerful language, or a simple compiler? What's going to result in the greater success of D in the long run? Seems pretty obvious to me (and you :)) "Sean L. Palmer" <palmer.sean@verizon.net> wrote in message news:bmcfq6$2icd$1@digitaldaemon.com... > I believe the given reason is that it would make the compiler implementation > more complicated, and would complicate exception handling. I know one of the design goals of D is a simple implementation, but this seems like a cop-out to me. > > Sean > > "Matthew Wilson" <matthew@stlsoft.org> wrote in message news:bmafdi$2u7n$2@digitaldaemon.com... > > Is there a good reason why we can't have ctors/dtors on structs? > > > > I think they'd be extremely useful, and am currently stymied on a > technique > > I wanted to use because of this. > > |
Copyright © 1999-2021 by the D Language Foundation