Thread overview | |||||
---|---|---|---|---|---|
|
March 27, 2014 Re: New feature in git-head: Uniform construction for built-in types | ||||
---|---|---|---|---|
| ||||
On Friday, March 07, 2014 12:41:23 Andrej Mitrovic wrote:
> https://github.com/D-Programming-Language/dmd/pull/1356 was recently merged (pull by Kenji), implementing this enhancement: https://d.puremagic.com/issues/show_bug.cgi?id=9112
>
> Example code:
>
> -----
> int n = int(1);
>
> int *p = new int(1);
> assert(*p == 1);
> -----
>
> I'm just curious what people think about the new feature. Discuss!
I've pushed for this for ages. Pointers to built-in types are seriously hampered without it, and it helps generic code considerably to have it. It was one of those things that I was shocked to find out didn't work from the get- go.
- Jonathan M Davis
|
March 27, 2014 Re: New feature in git-head: Uniform construction for built-in types | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | Awesome. I only found out that `auto intptr = new int(4)` didn't
work as expected about 30min ago!
Atila
On Thursday, 27 March 2014 at 06:11:01 UTC, Jonathan M Davis
wrote:
> On Friday, March 07, 2014 12:41:23 Andrej Mitrovic wrote:
>> https://github.com/D-Programming-Language/dmd/pull/1356 was recently
>> merged (pull by Kenji), implementing this enhancement:
>> https://d.puremagic.com/issues/show_bug.cgi?id=9112
>>
>> Example code:
>>
>> -----
>> int n = int(1);
>>
>> int *p = new int(1);
>> assert(*p == 1);
>> -----
>>
>> I'm just curious what people think about the new feature. Discuss!
>
> I've pushed for this for ages. Pointers to built-in types are seriously
> hampered without it, and it helps generic code considerably to have it. It was
> one of those things that I was shocked to find out didn't work from the get-
> go.
>
> - Jonathan M Davis
|
March 27, 2014 Re: New feature in git-head: Uniform construction for built-in types | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On Thursday, 27 March 2014 at 06:11:01 UTC, Jonathan M Davis wrote:
> I've pushed for this for ages. Pointers to built-in types are seriously
> hampered without it, and it helps generic code considerably to have it. It was
> one of those things that I was shocked to find out didn't work from the get-
> go.
>
> - Jonathan M Davis
Yay, fantastic! I dreamt of this feature for years, it's one of the very few areas where D used to be worse than C++.
|
Copyright © 1999-2021 by the D Language Foundation