On Tuesday, 25 December 2018 at 18:34:04 UTC, bauss wrote:
On Monday, 24 December 2018 at 00:24:05 UTC, Michelle Long
wrote:
More simple is : do not use the same identifier ;)
The whole point is to use the same identifier ;/
I think there is a bigger problem at stake here in terms of
softwa
On Tue, 25 Dec 2018 18:34:04 +, bauss wrote:
> I think there is a bigger problem at stake here in terms of software
> architecture.
>
> What's the point needed for them to have the same identifier?
A probably abstract base class with only one child class. Normally you
have "Foo" and "FooImpl
On Monday, 24 December 2018 at 00:24:05 UTC, Michelle Long wrote:
More simple is : do not use the same identifier ;)
The whole point is to use the same identifier ;/
I think there is a bigger problem at stake here in terms of
software architecture.
What's the point needed for them to have
On Tue, 25 Dec 2018 16:55:36 +, Neia Neutuladh wrote:
And I forgot part of it.
Let's say we did the work to make this function:
class X {}
template X(int N)
{
// `: X` somehow refers to the X in the outer scope
class X : X {}
}
How do you distinguish between the
On Tue, 25 Dec 2018 13:03:13 +, Michelle Long wrote:
> But I am not talking about inside the template being used. The whole
> point of doing this is so that one can refer to the base class using the
> same name as the derived with a template parameter to make a composite
> structure.
The follo
On Monday, 24 December 2018 at 22:55:55 UTC, Daniel Kozak wrote:
ne 23. 12. 2018 13:10 odesÃlatel Michelle Long via
Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> napsal:
class X
{
}
class X(int N) : X
{
}
Is there any real reason we can't do this?
Actually yes. It would break
ne 23. 12. 2018 13:10 odesÃlatel Michelle Long via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> napsal:
> class X
> {
>
> }
>
> class X(int N) : X
> {
>
> }
>
> Is there any real reason we can't do this?
Actually yes. It would break almost all of my code.
In D you can do thing like
On 12/23/18 7:09 AM, Michelle Long wrote:
class X
{
}
class X(int N) : X
{
}
Is there any real reason we can't do this?
I think it has less to do with class names and more to do with symbol
overloading.
The only place I think templates are allowed to overload names with
non-templates is
More simple is : do not use the same identifier ;)
The whole point is to use the same identifier ;/
On Sunday, 23 December 2018 at 12:09:31 UTC, Michelle Long wrote:
class X
{
}
class X(int N) : X
{
}
Is there any real reason we can't do this?
It is very nice to be able to treat X like the base and X!n as
a derived class.
Sure we can do
class X(int N) : X!0
{
static if(N == 0)
{
class X
{
}
class X(int N) : X
{
}
Is there any real reason we can't do this?
It is very nice to be able to treat X like the base and X!n as a
derived class.
Sure we can do
class X(int N) : X!0
{
static if(N == 0)
{
}
}
but this is very ugly, in my code I always have to use X!0
11 matches
Mail list logo