kenji hara k.hara...@gmail.com wrote in message
news:mailman.1646.1334209001.4860.digitalmar...@puremagic.com...
It conflicts with $B!I(Balias this$B!I(B syntax.
template Inherits(T)
{
T value;
alias T Inherits; // (1) Inherits!int == int
alias T this; // (2) declares alias
On 2012-04-12 11:21, Daniel Murphy wrote:
Doesn't it need to be explicitly marked as a 'mixin template' for it to be
mixed in?
No, I don't think that is forced.
--
/Jacob Carlborg
No. Current implementation doesn't enforce it.
Kenji Hara
2012年4月12日18:21 Daniel Murphy yebbl...@nospamgmail.com:
kenji hara k.hara...@gmail.com wrote in message
news:mailman.1646.1334209001.4860.digitalmar...@puremagic.com...
It conflicts with ”alias this” syntax.
template Inherits(T)
{
Jacob Carlborg d...@me.com wrote in message
news:jm66st$2d3f$1...@digitalmars.com...
On 2012-04-12 11:21, Daniel Murphy wrote:
Doesn't it need to be explicitly marked as a 'mixin template' for it to
be
mixed in?
No, I don't think that is forced.
--
/Jacob Carlborg
Hmm. I guess the
On 12/04/12 04:21, Reid Levenick wrote:
Firstly, I had no idea where suggestions should go, and I saw a few
others here and thus here I am.
I was writing some code that depended heavily on my own eponymous
templates, and decided to change the names of some of them to make them
more
On Thu, Apr 12, 2012 at 07:31:11PM +1000, Daniel Murphy wrote:
Jacob Carlborg d...@me.com wrote in message
news:jm66st$2d3f$1...@digitalmars.com...
On 2012-04-12 11:21, Daniel Murphy wrote:
Doesn't it need to be explicitly marked as a 'mixin template' for
it to be mixed in?
No,
+1 for This
bearophile wrote in message news:bcqvpvgjswwdgsfxs...@forum.dlang.org...
Reid Levenick:
So, my idea is that the 'this' keyword could be used in templates as a
shortcut for eponymous templates, allowing code like this
template anEponymousTemplate( size_t whatever ) {
enum this
+1 for This
bearophile wrote in message news:bcqvpvgjswwdgsfxs...@forum.dlang.org...
Reid Levenick:
So, my idea is that the 'this' keyword could be used in templates as a
shortcut for eponymous templates, allowing code like this
template anEponymousTemplate( size_t whatever ) {
enum this
On 04/12/2012 04:21 AM, Reid Levenick wrote:
Firstly, I had no idea where suggestions should go, and I saw a few
others here and thus here I am.
I was writing some code that depended heavily on my own eponymous
templates, and decided to change the names of some of them to make them
more
On Thu, 12 Apr 2012 14:04:44 -0400, Timon Gehr timon.g...@gmx.ch wrote:
The general idea is useful, but there are issues.
'this' is the wrong keyword for the job. A class or struct instance is
very different from a template instance and the proposed usage would
clash with existing and
On Thu, Apr 12, 2012 at 08:04:44PM +0200, Timon Gehr wrote:
[...]
The general idea is useful, but there are issues.
'this' is the wrong keyword for the job. A class or struct instance is
very different from a template instance and the proposed usage would
clash with existing and useful ones.
On 04/12/2012 08:19 PM, Steven Schveighoffer wrote:
On Thu, 12 Apr 2012 14:04:44 -0400, Timon Gehr timon.g...@gmx.ch wrote:
The general idea is useful, but there are issues.
'this' is the wrong keyword for the job. A class or struct instance is
very different from a template instance and the
Firstly, I had no idea where suggestions should go, and I saw a
few others here and thus here I am.
I was writing some code that depended heavily on my own eponymous
templates, and decided to change the names of some of them to
make them more self-documenting. However, after changing the
On Thu, Apr 12, 2012 at 04:21:45AM +0200, Reid Levenick wrote:
Firstly, I had no idea where suggestions should go, and I saw a few
others here and thus here I am.
AFAIK this is as good a place as any other.
I was writing some code that depended heavily on my own eponymous
templates, and
Reid Levenick:
So, my idea is that the 'this' keyword could be used in
templates as a shortcut for eponymous templates, allowing code
like this
template anEponymousTemplate( size_t whatever ) {
enum this = whatever * 2;
}
Other This (with upper case)?
Bye,
bearophile
On 4/11/12 9:21 PM, Reid Levenick wrote:
So, my idea is that the 'this' keyword could be used in templates as a
shortcut for eponymous templates, allowing code like this
template anEponymousTemplate( size_t whatever ) {
enum this = whatever * 2;
}
template anotherOne( T ) {
static if( is( T ==
On Thursday, 12 April 2012 at 04:28:01 UTC, Nathan M. Swan wrote:
I like the idea. To get rid of any confusion with keywords,
name-mangling, or classes, I suggest having this being
syntactic sugar for the name of the template.
I expressed it badly at the time, but that is exactly what I
On Thursday, 12 April 2012 at 02:21:46 UTC, Reid Levenick wrote:
Firstly, I had no idea where suggestions should go, and I saw a
few others here and thus here I am.
I was writing some code that depended heavily on my own
eponymous templates, and decided to change the names of some of
them to
12.04.2012 6:21, Reid Levenick написал:
Firstly, I had no idea where suggestions should go, and I saw a few
others here and thus here I am.
I was writing some code that depended heavily on my own eponymous
templates, and decided to change the names of some of them to make them
more
It conflicts with ”alias this” syntax.
template Inherits(T)
{
T value;
alias T Inherits; // (1) Inherits!int == int
alias T this; // (2) declares alias this!
}
struct S {
mixin Inherits!int; // (1) invalid or (2) mixing alias this declaration?
}
Kenji Hara
2012年4月12日11:21 Reid
20 matches
Mail list logo