On Thursday, 4 June 2020 at 19:42:57 UTC, mw wrote:
On Thursday, 4 June 2020 at 18:42:05 UTC, H. S. Teoh wrote:
TBH, whenever I run into a diamond inheritance problem or
similar, my first reaction is, I'm using the wrong tool for
^^
Haha, it's also because most of th
On Thursday, 4 June 2020 at 18:42:05 UTC, H. S. Teoh wrote:
TBH, whenever I run into a diamond inheritance problem or
similar, my first reaction is, I'm using the wrong tool for
modelling my data; I should be using some kind of
component-based system instead of OO inheritance.
I have no probl
On Thu, Jun 04, 2020 at 06:09:35PM +, mw via Digitalmars-d-learn wrote:
[...]
> --
> class Person : NameI, AddrI {
> mixin NameT!Person rename equals as name_equals;
> mixin AddrT!Person rename equals as addr_equals;
>
>
On Sunday, 31 May 2020 at 06:28:11 UTC, mw wrote:
This is better, ... but it breaks std.traits:
void main() {
auto fields = FieldNameTuple!(Point);
writeln(fields);
}
$ ./b
varvarvar
And normally, we cannot define 2 fields with different types:
class P {
int x;
double x; // b.d(45):
On Wednesday, 3 June 2020 at 09:03:22 UTC, drathier wrote:
I'm generating some code. Some of the generated types need to
be overridden, so I define them manually at the top of the
generated file. Then I need to guard against redefining the
identifier (type/value/function) later on, in the gener
On Wednesday, 3 June 2020 at 17:02:35 UTC, H. S. Teoh wrote:
On Wed, Jun 03, 2020 at 09:36:52AM +, drathier via
Digitalmars-d-learn wrote:
I'm wondering if there's a place that lists things which are
slower/faster to compile? DMD is pretty famed for compiling
quickly, but I'm not seeing par
On Thursday, 4 June 2020 at 14:20:45 UTC, Q. Schroll wrote:
Little nitpicking, but D has many forms of string literals.
Escaping is hard to read especially without syntax
highlighting. Escaping to me is an old hack C did we shouldn't
really use.
string exists(string s) {
return
On Thursday, 4 June 2020 at 14:20:45 UTC, Q. Schroll wrote:
On Thursday, 4 June 2020 at 09:03:40 UTC, Simen Kjærås wrote:
string exists(string s) {
return "__traits(compiles, { mixin(\"alias _ = "~s~";\");
})";
}
Little nitpicking, but D has many forms of string literals.
Escaping is ha
On Thursday, 4 June 2020 at 09:03:40 UTC, Simen Kjærås wrote:
string exists(string s) {
return "__traits(compiles, { mixin(\"alias _ = "~s~";\");
})";
}
Little nitpicking, but D has many forms of string literals.
Escaping is hard to read especially without syntax highlighting.
Escaping
On Wednesday, 3 June 2020 at 15:25:51 UTC, Paul Backus wrote:
On Wednesday, 3 June 2020 at 13:24:17 UTC, Basile B. wrote:
This is because the template parameter must be resolved to a
valid symbol or type.
This version other version bypass the problem:
---
enum Exists(string s) = is(typeof(mixi
10 matches
Mail list logo