On Thursday, 6 December 2012 at 00:31:53 UTC, Jonathan M Davis
wrote:
Pretty much the only kind of situation that I remember running
into where I
would consider Variant to be a good solution is one where you
literally have
to return a type from a function where you can't know that type
at com
On Wednesday, 5 December 2012 at 19:32:03 UTC, Jonathan M Davis
wrote:
Yes, but that inevitably forces you to check the type in order
to handle it correctly, which means that implicit conversion
just doesn't work. In order for implicit conversion to work,
you have to be able to assume that you'
On Thursday, December 06, 2012 01:06:33 Dmitry Olshansky wrote:
> > To know what on earth you're suposed to do with the variable. If it's a
> > type that you can't handle, then yes, you'd probably have to throw an
> > exception, but you generally use a Variant because you need to be able to
> > ret
On Wednesday, 5 December 2012 at 21:39:31 UTC, Era Scarecrow
wrote:
My god did it finally post? Sorry if it repeated a few times...
Left it on easily overnight and it still didn't say it posted any
of it. :(
On Tuesday, 4 December 2012 at 17:43:21 UTC, Dmitry Olshansky
wrote:
Well TDPL claims multiple alias this is allowed so in some
distant future it maybe possible for Varaint to alias this to
all built-in types.
Maybe
I remember back when I was originally reading about C++ and
overloadin
12/5/2012 11:31 PM, Jonathan M Davis пишет:
On Wednesday, December 05, 2012 22:07:48 Dmitry Olshansky wrote:
12/5/2012 5:40 AM, Jonathan M Davis пишет:
There's nothing natural about Variant. It's attempting to add dynamic
typing to a statically typed language.
Bleh that smells religious. Ther
On Wednesday, December 05, 2012 22:07:48 Dmitry Olshansky wrote:
> 12/5/2012 5:40 AM, Jonathan M Davis пишет:
> > There's nothing natural about Variant. It's attempting to add dynamic
> > typing to a statically typed language.
>
> Bleh that smells religious. There are cases where one may just go f
12/5/2012 5:40 AM, Jonathan M Davis пишет:
On Tuesday, December 04, 2012 23:28:25 Dmitry Olshansky wrote:
12/4/2012 10:40 PM, Jonathan M Davis пишет:
On Tuesday, December 04, 2012 21:43:09 Dmitry Olshansky wrote:
Well TDPL claims multiple alias this is allowed so in some distant
future it mayb
On Tuesday, 4 December 2012 at 17:43:21 UTC, Dmitry Olshansky
wrote:
Well TDPL claims multiple alias this is allowed so in some
distant future it maybe possible for Varaint to alias this to
all built-in types.
Maybe
I remember back when I was originally reading about C++ and
overloadin
On Tuesday, 4 December 2012 at 17:43:21 UTC, Dmitry Olshansky
wrote:
Well TDPL claims multiple alias this is allowed so in some
distant future it maybe possible for Varaint to alias this to
all built-in types.
Maybe
I remember back when I was originally reading about C++ and
overloadin
On Tuesday, December 04, 2012 23:28:25 Dmitry Olshansky wrote:
> 12/4/2012 10:40 PM, Jonathan M Davis пишет:
> > On Tuesday, December 04, 2012 21:43:09 Dmitry Olshansky wrote:
> >> Well TDPL claims multiple alias this is allowed so in some distant
> >> future it maybe possible for Varaint to alias
On Tuesday, 4 December 2012 at 17:43:21 UTC, Dmitry Olshansky
wrote:
Well TDPL claims multiple alias this is allowed so in some
distant future it maybe possible for Varaint to alias this to
all built-in types.
Maybe
I remember back when I was originally reading about C++ and
overloadin
On Tuesday, 4 December 2012 at 17:43:21 UTC, Dmitry Olshansky
wrote:
Well TDPL claims multiple alias this is allowed so in some
distant future it maybe possible for Varaint to alias this to
all built-in types.
Maybe
I remember back when I was originally reading about C++ and
overloadin
On Tuesday, 4 December 2012 at 17:43:21 UTC, Dmitry Olshansky
wrote:
Well TDPL claims multiple alias this is allowed so in some
distant future it maybe possible for Varaint to alias this to
all built-in types.
Maybe
I remember back when I was originally reading about C++ and
overloadin
On Tuesday, 4 December 2012 at 17:43:21 UTC, Dmitry Olshansky
wrote:
Well TDPL claims multiple alias this is allowed so in some
distant future it maybe possible for Varaint to alias this to
all built-in types.
Maybe
I remember back when i was originally reading about C++ and
overloadin
12/4/2012 10:40 PM, Jonathan M Davis пишет:
On Tuesday, December 04, 2012 21:43:09 Dmitry Olshansky wrote:
Well TDPL claims multiple alias this is allowed so in some distant
future it maybe possible for Varaint to alias this to all built-in types.
That would be pretty hideous IMHO. There's a r
On Tuesday, December 04, 2012 21:43:09 Dmitry Olshansky wrote:
> Well TDPL claims multiple alias this is allowed so in some distant
> future it maybe possible for Varaint to alias this to all built-in types.
That would be pretty hideous IMHO. There's a reason that D eschews implicit
conversions i
On 2012-12-04 13:59, Era Scarecrow wrote:
It also doesn't seem like it would be difficult to add, only 'auto'
would cause any real errors (as it's not a known type it can return).
It has been suggested before, overriding on the return type. I has more
problems that one might think first.
12/4/2012 4:08 PM, Jacob Carlborg пишет:
On 2012-12-04 08:48, Era Scarecrow wrote:
A thought's been going through my head for a while now. I wonder about
template return values. Function signatures are usually the inputs and
NOT the return type. However for writing a variant type could
On Tuesday, 4 December 2012 at 12:48:57 UTC, bearophile wrote:
Era Scarecrow:
So then in theory
Variant v;
int i = v.getValue; //calls getValue!int()
Meant it to be long i, but the idea is the same.
I think this is not possible in D.
This seems possible:
auto i = v.getValue!int;
Inde
Era Scarecrow:
So then in theory
Variant v;
int i = v.getValue; //calls getValue!int()
I think this is not possible in D.
This seems possible:
auto i = v.getValue!int;
Bye,
bearophile
On 2012-12-04 08:48, Era Scarecrow wrote:
A thought's been going through my head for a while now. I wonder about
template return values. Function signatures are usually the inputs and
NOT the return type. However for writing a variant type could be so very
useful. So unless I've mis
A thought's been going through my head for a while now. I wonder
about template return values. Function signatures are usually the
inputs and NOT the return type. However for writing a variant
type could be so very useful. So unless I've misunderstood, this
doesn't work (but i
23 matches
Mail list logo