January 21, 2008 Re: DMD 1.026 and 2.010 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Extrawurst | Extrawurst wrote:
> ohh what a great day for const, #1319 was in top ten for me ;). thanks for this release!
>
> but what happened to scoped interfaces:
> [CODE]
>
> interface IFoo {
> }
>
> class Foo : IFoo {}
>
> IFoo getaFoo(){
> return new Foo();
> }
>
> void main() {
> scope auto a = getaFoo();
> }
>
> [/CODE]
>
> this is illegal since 2.010. how can i do such a thing from now on ?
It never worked anyway. The problem is an interface cannot be deleted. The solution is two steps:
scope f = new Foo();
IFoo i = f;
|
January 21, 2008 Re: DMD 1.026 and 2.010 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Extrawurst | Extrawurst wrote:
> "
> opAssign can no longer be overloaded for class objects.
> "
>
> why is that ? that change breaks lots of my code... ;(
I didn't realize anyone was using it. What are you using it for?
|
January 21, 2008 Re: DMD 1.026 and 2.010 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright schrieb:
> Extrawurst wrote:
>> ohh what a great day for const, #1319 was in top ten for me ;). thanks for this release!
>>
>> but what happened to scoped interfaces:
>> [CODE]
>>
>> interface IFoo {
>> }
>>
>> class Foo : IFoo {}
>>
>> IFoo getaFoo(){
>> return new Foo();
>> }
>>
>> void main() {
>> scope auto a = getaFoo();
>> }
>>
>> [/CODE]
>>
>> this is illegal since 2.010. how can i do such a thing from now on ?
>
> It never worked anyway. The problem is an interface cannot be deleted. The solution is two steps:
>
> scope f = new Foo();
> IFoo i = f;
The point is that an unchanged code that used to work with dmd2.009 did exactly that and worked. By changing to dmd2.010 it is now broken.
|
January 21, 2008 Re: DMD 1.026 and 2.010 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright schrieb:
> Extrawurst wrote:
>> "
>> opAssign can no longer be overloaded for class objects.
>> "
>>
>> why is that ? that change breaks lots of my code... ;(
>
> I didn't realize anyone was using it. What are you using it for?
The only xml parser implementation i got running under D2 makes heavy use of opApply. It is really necessary to disable that ? What for ?
|
January 21, 2008 Re: DMD 1.026 and 2.010 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Extrawurst | Extrawurst wrote:
> Walter Bright schrieb:
>> Extrawurst wrote:
>>> "
>>> opAssign can no longer be overloaded for class objects.
>>> "
>>>
>>> why is that ? that change breaks lots of my code... ;(
>>
>> I didn't realize anyone was using it. What are you using it for?
>
> The only xml parser implementation i got running under D2 makes heavy use of opApply. It is really necessary to disable that ? What for ?
opApply is still there, it's opAssign that's changed.
|
January 21, 2008 Re: DMD 1.026 and 2.010 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Extrawurst | Extrawurst wrote:
> The point is that an unchanged code that used to work with dmd2.009 did exactly that and worked. By changing to dmd2.010 it is now broken.
That's to be expected, 2.x compilers are still alpha quality.
|
January 21, 2008 Re: DMD 1.026 and 2.010 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to torhu | torhu schrieb:
> Extrawurst wrote:
>> Walter Bright schrieb:
>>> Extrawurst wrote:
>>>> "
>>>> opAssign can no longer be overloaded for class objects.
>>>> "
>>>>
>>>> why is that ? that change breaks lots of my code... ;(
>>>
>>> I didn't realize anyone was using it. What are you using it for?
>>
>> The only xml parser implementation i got running under D2 makes heavy use of opApply. It is really necessary to disable that ? What for ?
>
> opApply is still there, it's opAssign that's changed.
it was my bad as in the discussion above i was talking about opAssign !
|
January 21, 2008 Re: DMD 1.026 and 2.010 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to torhu | torhu schrieb:
> Extrawurst wrote:
>> The point is that an unchanged code that used to work with dmd2.009 did exactly that and worked. By changing to dmd2.010 it is now broken.
>
> That's to be expected, 2.x compilers are still alpha quality.
i am just asking for why this has changed ?!
|
January 21, 2008 Re: DMD 1.026 and 2.010 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright pisze:
> Extrawurst wrote:
>> "
>> opAssign can no longer be overloaded for class objects.
>> "
>>
>> why is that ? that change breaks lots of my code... ;(
>
> I didn't realize anyone was using it. What are you using it for?
Well, I will answer as it broke (also) my code...
In doost I have something like this:
----
Any opAssign(ValueType)(ValueType value) {
content=new Holder!(ValueType)(value);
return this;
}
----
Currently there is no way to initialize template class using "standard" way:
1. No templated constructors
2. No templated opAssign
Now only solution is to use template function e.g. assign
Was it really necessary? Why? I was hoping rather to get templated constructors...
BR
Marcin Kuszczak
(aarti_pl)
|
January 21, 2008 Re: DMD 1.026 and 2.010 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> bug fixing
>
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.026.zip
>
> http://www.digitalmars.com/d/changelog.html
> http://ftp.digitalmars.com/dmd.2.010.zip
Thanks! Are there any short-term plans to do anything with 'pure', or are you just reserving the keyword (as was done for 'macro')?
BTW, could you please fix bug #1072? It should only take two minutes (already has a patch). Just got bitten by it again.
|
Copyright © 1999-2021 by the D Language Foundation