May 31, 2012 Re: Defining a custom *constructor* (not initializer!) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | On Friday, 11 May 2012 at 15:23:10 UTC, Steven Schveighoffer wrote:
> I'll wait for an answer before thinking more about this. It feels imminently solvable...
>
> -Steve
Did you come across any ideas? :)
|
May 31, 2012 Re: Defining a custom *constructor* (not initializer!) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mehrdad | On Thu, 31 May 2012 03:25:40 -0400, Mehrdad <wfunction@hotmail.com> wrote:
> On Friday, 11 May 2012 at 15:23:10 UTC, Steven Schveighoffer wrote:
>> I'll wait for an answer before thinking more about this. It feels imminently solvable...
>>
>> -Steve
>
> Did you come across any ideas? :)
Sorry lost track of this. I'll think about it again.
-Steve
|
May 31, 2012 Re: Defining a custom *constructor* (not initializer!) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | On Thursday, 31 May 2012 at 10:58:51 UTC, Steven Schveighoffer wrote:
> On Thu, 31 May 2012 03:25:40 -0400, Mehrdad <wfunction@hotmail.com> wrote:
>
>> On Friday, 11 May 2012 at 15:23:10 UTC, Steven Schveighoffer wrote:
>>> I'll wait for an answer before thinking more about this. It feels imminently solvable...
>>>
>>> -Steve
>>
>> Did you come across any ideas? :)
>
> Sorry lost track of this. I'll think about it again.
>
> -Steve
o lol. ok.
Do you think it'd be difficult to add an extra layer of indirection for calling the current "constructors"/finalizers? I feel like, if DMD would just look for a __construct and a __destroy static method instead of directly calling the constructor/finalizer, it'd all work out nicely...
|
June 01, 2012 Re: Defining a custom *constructor* (not initializer!) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mehrdad | I just added this: http://d.puremagic.com/issues/show_bug.cgi?id=8177 I don't understand the DMD code well enough to implement this myself (the identifiers are all Greek to me...), but I honestly think implementing it should be relatively simple, since the default implementations are trivial (and I don't think it requires too much code to be changed in DMD). If someone could implement it -- or perhaps guide me through where I should look/how I could implement it myself -- I'd really appreciate it. :) Thanks! |
Copyright © 1999-2021 by the D Language Foundation