Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
September 17, 2010 [phobos] phobos commit, revision 2021 | ||||
---|---|---|---|---|
| ||||
phobos commit, revision 2021 user: dsimcha msg: Fix std.range.Zip. http://www.dsource.org/projects/phobos/changeset/2021 |
September 17, 2010 [phobos] phobos commit, revision 2021 | ||||
---|---|---|---|---|
| ||||
Posted in reply to dsource.org | I assume it makes sense to cast away const/immutable in emplace()
since we're treating the block as a raw memory block without a real type.
On 9/17/2010 8:48 PM, dsource.org wrote:
> phobos commit, revision 2021
>
>
> user: dsimcha
>
> msg:
> Fix std.range.Zip.
>
> http://www.dsource.org/projects/phobos/changeset/2021
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
|
September 17, 2010 [phobos] phobos commit, revision 2021 | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Simcha | I'm not sure. Untyped does not entail writable. Ideally we'd avoid casting away const and immutable.
Andrei
On 09/17/2010 07:50 PM, David Simcha wrote:
> I assume it makes sense to cast away const/immutable in emplace() since we're treating the block as a raw memory block without a real type.
>
> On 9/17/2010 8:48 PM, dsource.org wrote:
>> phobos commit, revision 2021
>>
>>
>> user: dsimcha
>>
>> msg:
>> Fix std.range.Zip.
>>
>> http://www.dsource.org/projects/phobos/changeset/2021
>>
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>>
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
|
September 17, 2010 [phobos] phobos commit, revision 2021 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Friday 17 September 2010 18:13:01 Andrei Alexandrescu wrote:
> I'm not sure. Untyped does not entail writable. Ideally we'd avoid casting away const and immutable.
Is it still the case that you only get one template instatiation for T, const T, and immutable T instead of three? As I understood it, that's how it at least used to work, but I get the impression now that that's no longer the case. Otherwise, for instance, Unqual wouldn't be necessary, I would think.
- Jonathan M Davis
|
September 17, 2010 [phobos] phobos commit, revision 2021 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | Ok, well my logic for allowing it is that we need some way of
initializing immutable objects, and it's no different than allowing a
single write to immutable variables inside a class/struct c'tor. I put
it in because I needed it to support const/immutable elements in Zip,
but if someone can suggest a better solution, I'd be open to removing it.
On 9/17/2010 9:13 PM, Andrei Alexandrescu wrote:
> I'm not sure. Untyped does not entail writable. Ideally we'd avoid casting away const and immutable.
>
> Andrei
>
> On 09/17/2010 07:50 PM, David Simcha wrote:
>> I assume it makes sense to cast away const/immutable in emplace() since we're treating the block as a raw memory block without a real type.
>>
>> On 9/17/2010 8:48 PM, dsource.org wrote:
>>> phobos commit, revision 2021
>>>
>>>
>>> user: dsimcha
>>>
>>> msg:
>>> Fix std.range.Zip.
>>>
>>> http://www.dsource.org/projects/phobos/changeset/2021
>>>
>>> _______________________________________________
>>> phobos mailing list
>>> phobos at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>>>
>>
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
|
Copyright © 1999-2021 by the D Language Foundation