Re: Practical difference between template "alias" arguments/normal generic arguments in this case?

2017-04-12 Thread Juanjo Alvarez via Digitalmars-d-learn
Thanks to both, I got it. Type templates for generic types, and alias for other things knowing that the instantiation is by symbol. Yes, the "alias this" in my message was a (double) brainfart, I actually wanted to write "alias template". In this case both functions had the same assembler

Re: Practical difference between template "alias" arguments/normal generic arguments in this case?

2017-04-12 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 12 April 2017 at 11:06:13 UTC, Juanjo Alvarez wrote: Hi! With "alias this" accepting runtime variables I'm struggling to understand the difference between a generic function with an "alias this" parameter and another one with a "runtime" parameter of template type. Example:

Re: Practical difference between template "alias" arguments/normal generic arguments in this case?

2017-04-12 Thread Mike Parker via Digitalmars-d-learn
On Wednesday, 12 April 2017 at 11:06:13 UTC, Juanjo Alvarez wrote: Hi! With "alias this" accepting runtime variables I'm struggling to FYI, you are not talking about "alias this", but "alias template parameters", two very different concepts. understand the difference between a generic

Practical difference between template "alias" arguments/normal generic arguments in this case?

2017-04-12 Thread Juanjo Alvarez via Digitalmars-d-learn
Hi! With "alias this" accepting runtime variables I'm struggling to understand the difference between a generic function with an "alias this" parameter and another one with a "runtime" parameter of template type. Example: // example code import std.stdio: writeln; void