I'm obviously doing something wrong, but don't quite understand.
```d
mixin template helper() {
mixin("writeln(12);");
}
struct Foo {
void opDispatch(string name)() {
import std.stdio;
mixin helper!();
//mixin("writeln(12);");
}
}
void main() {
Foo.init.opDispatch!"bar"();
}
On Wednesday, 11 January 2023 at 18:56:47 UTC, eXodiquas wrote:
Hello everyone,
I build a web tool that allows people to upload some files.
Those files should not be public, so I copy them into a folder
hidden away on the filesystem. But, I want an authenticated
user to be able to look at the
On Thursday, 12 January 2023 at 08:03:34 UTC, John Chapman wrote:
I'm obviously doing something wrong, but don't quite understand.
```d
mixin template helper() {
mixin("writeln(12);");
}
struct Foo {
void opDispatch(string name)() {
import std.stdio;
mixin helper!();
//mixin("wr
Please Consider the code:
import std.stdio;
class a {
public:
this(){}
~this(){}
class b {
public:
this.outer.c C = new this.outer.c();
this() {
writel
On Thursday, 12 January 2023 at 17:05:04 UTC, seany wrote:
How can I make it, that classes b and c can access each other,
and create instances of each other freely? Thank you.
Ignoring the typos you could try auto and static:
```d
class a
{ //outer
static class b
{ // inner 1
c C;
On Thursday, 12 January 2023 at 17:41:39 UTC, Salih Dincer wrote:
On Thursday, 12 January 2023 at 17:05:04 UTC, seany wrote:
How can I make it, that classes b and c can access each other,
and create instances of each other freely? Thank you.
Ignoring the typos you could try auto and static:
On Thursday, 12 January 2023 at 17:46:45 UTC, seany wrote:
Please, can you explain what role "static" plays here? Thank
you again
Of course, there are actually 2 paragraphs of information and
examples [here](
https://dlang.org/spec/class.html#nested-context):
Non-static nested classes work
On 1/12/23 12:05 PM, seany wrote:
How can I make it, that classes b and c can access each other, and
create instances of each other freely? Thank you.
So to just point out something that wasn't discussed by Salih:
When you declare a field of a class with an initializer, *that
initializer i
On Tuesday, 10 January 2023 at 01:22:33 UTC, H. S. Teoh wrote:
Here's a challenge. Given an input year, for example, "2023",
write a program that outputs (for the corresponding year):
Now, I wrote a nested class using range and copying from Matheus'
code. Of course not as comprehensive as [yo
On 10.01.23 23:22, monkyyy wrote:
On Tuesday, 10 January 2023 at 19:10:09 UTC, Christian Köstlin wrote:
On 10.01.23 01:17, Paul wrote:
There is also https://exercism.org/tracks/d with some tasks for dlang.
Kind regards,
Christian
Its all converted code; worthless
I was not aware, that the qu
On 10.01.23 23:30, Paul wrote:
On Tuesday, 10 January 2023 at 01:31:28 UTC, Ali Çehreli wrote:
On 1/9/23 16:17, Paul wrote:
> coding challenges
Perhaps the following two?
https://rosettacode.org/
https://adventofcode.com/
Ali
Excellent. Thanks.
For this years advent-of-code Steven S
On Thursday, 12 January 2023 at 20:28:26 UTC, Christian Köstlin
wrote:
For this years advent-of-code Steven Schveighoffer
(https://github.com
/schveiguy/adventofcode/tree/master/2022) has a complete set of
dlang
solutions.
Kind regards,
Christian
Very helpful. Thanks Christian.
(Sorry if this is a duplicate.)
If I have the following code inside of a module:
```D
class Obj {
private {
string name = "Hi";
}
}
class ObjDerived : Obj {
}
```
Is it best practice to define `ObjDerived` inside another module,
since `ObjDerived` can still access the members
On Friday, 13 January 2023 at 05:17:59 UTC, thebluepandabear
wrote:
(Sorry if this is a duplicate.)
If I have the following code inside of a module:
```D
class Obj {
private {
string name = "Hi";
}
}
class ObjDerived : Obj {
}
```
Is it best practice to define `ObjDerived` in
14 matches
Mail list logo