April 01, 2009

dsimcha wrote:
> == Quote from Don (nospam@nospam.com)'s article
>> It's just you. <g>. The win32 build works fine for me.
> 
> Never mind, it looks to be related to some strange options my IDE is passing to DMD.

Just tell it to stop passing -hcf [1].

  -- Daniel

[1] HCF: Halt and Catch Fire, an old PDP-11 opcode, I believe.  :P
April 01, 2009
Charles Hixson wrote:
> bearophile wrote:
>> davidl:
>>> why not make opDot some compile time stuff?
>>
>> You mean run time.
>>
>>> this can be particular useful for COM
>>
>> And GUIs, I guess. It smells of Object-C++, but the syntax is nicer.
>> But such runtime code must be not included into the executable if this feature is nowhere used in the code. D executable are already quite big enough.
>>
>> Bye,
>> bearophile
> Syntax and lack of garbage collection is why I never seriously considered Object-C++.
> 
> Seriously... It's important to be able to write code that can be optimized at compile time...and it's also important to be able to write code that can be dynamic at run-time.  D has been lacking in the second set of capabilities, though it's been dynamite at the first.
> 
> ... After saying this I started thinking a bit more.  D is more dynamic that we normally give it credit for, but the syntax for dynamic interaction is painful, so it tends not to be used.

What dynamic features would be useful?

D has:
- get an opaque reference to a type
- get the name of a type
- get a smattering of other information about a type
- polymorphic method dispatch
- safe casts
- constructing objects with default constructors by reflection

The other common dynamic/reflection type stuff:
- getting information about fields and methods
- getting and setting fields
- invoking methods by reflection
- constructing objects by reflection, even if they don't have default constructors

Walter says you can do everything here using compile-time reflection. That's true, but it doesn't suffice, I think. You need something like Jascha Wetzel's ClassInfoEx in the standard library. I'd be willing to write such a thing, if it would be accepted. (ClassInfoEx has no license information included in it, and Jascha is not around, so it cannot be used.)

But it _has_ to be in the standard library. Additionally, it can't incur greater costs to mix it in multiple times -- it should be idempotent.
April 02, 2009
On Thu, Apr 2, 2009 at 8:21 AM, Christopher Wright <dhasenan@gmail.com> wrote:> Charles Hixson wrote:
> Walter says you can do everything here using compile-time reflection. That's true, but it doesn't suffice, I think. You need something like Jascha Wetzel's ClassInfoEx in the standard library. I'd be willing to write such a thing, if it would be accepted. (ClassInfoEx has no license information included in it, and Jascha is not around, so it cannot be used.)

Jascha's not around anymore but I don't think he's dead.  The first step would be to try to contact him directly about the license. There's an email address for him here: http://ddbg.mainia.de/releases.html.

--bb
April 02, 2009
Bill Baxter wrote:
> On Thu, Apr 2, 2009 at 8:21 AM, Christopher Wright
> <dhasenan@gmail.com> wrote:> Charles Hixson wrote:
>> Walter says you can do everything here using compile-time reflection. That's
>> true, but it doesn't suffice, I think. You need something like Jascha
>> Wetzel's ClassInfoEx in the standard library. I'd be willing to write such a
>> thing, if it would be accepted. (ClassInfoEx has no license information
>> included in it, and Jascha is not around, so it cannot be used.)
> 
> Jascha's not around anymore but I don't think he's dead.  The first
> step would be to try to contact him directly about the license.
> There's an email address for him here:
> http://ddbg.mainia.de/releases.html.
> 
> --bb

Good point.

On the other hand, rewriting the functionality would be the work of a few hours, so it's no big deal either way.
April 02, 2009
On Thu, Apr 2, 2009 at 11:28 AM, Christopher Wright <dhasenan@gmail.com> wrote:
> Bill Baxter wrote:
>>
>> On Thu, Apr 2, 2009 at 8:21 AM, Christopher Wright <dhasenan@gmail.com> wrote:> Charles Hixson wrote:
>>>
>>> Walter says you can do everything here using compile-time reflection.
>>> That's
>>> true, but it doesn't suffice, I think. You need something like Jascha
>>> Wetzel's ClassInfoEx in the standard library. I'd be willing to write
>>> such a
>>> thing, if it would be accepted. (ClassInfoEx has no license information
>>> included in it, and Jascha is not around, so it cannot be used.)
>>
>> Jascha's not around anymore but I don't think he's dead.  The first step would be to try to contact him directly about the license. There's an email address for him here: http://ddbg.mainia.de/releases.html.
>>
>> --bb
>
> Good point.
>
> On the other hand, rewriting the functionality would be the work of a few hours, so it's no big deal either way.

Oh.  That's all?  In that case stop typing emails and get to work!

--bb
April 02, 2009
On Wed, 01 Apr 2009 18:34:56 -0400, Christopher Wright <dhasenan@gmail.com> wrote:

>Walter Bright wrote:
>> I've thought of that a couple times, and there was a reason it was a problem, I just can't remember it at the moment!
>
>For one thing, no polymorphism. For that reason alone I would never use it.

It's not such a big problem because you could define a polymorphic opDot yourself:

class C
{
    Variant opDot(string name, A)(A args)
    {
        return virtualDot(name, args);
    }

    Variant virtualDot(string name, ...) {}
}

class D : C
{
    override Variant virtualDot(string name, ...) {}
}

There must be reasons other than the lack of polymorphism.
April 02, 2009
Walter Bright wrote:
> The large volume of bug fixes is because a lot of people contributed patches. Thanks!

Incidentally, should the D pages contain a short description of how you'd prefer patches delivered?

Maybe a link next to "Issues & Bugs" in the side box?
April 02, 2009
Georg Wrede wrote:
> Walter Bright wrote:
>> The large volume of bug fixes is because a lot of people contributed patches. Thanks!
> 
> Incidentally, should the D pages contain a short description of how you'd prefer patches delivered?
> 
> Maybe a link next to "Issues & Bugs" in the side box?
Yes. I've just posted patches for almost every segfault I could find -- I hope they're useful <g>.
April 03, 2009
Georg Wrede wrote:
> Walter Bright wrote:
>> The large volume of bug fixes is because a lot of people contributed patches. Thanks!
> 
> Incidentally, should the D pages contain a short description of how you'd prefer patches delivered?
> 
> Maybe a link next to "Issues & Bugs" in the side box?

Good idea. They should be delivered via bugzilla.
1 2 3 4
Next ›   Last »