Worst ideas/features in programming languages?

bauss jj_1337 at live.dk
Tue Nov 23 09:09:03 UTC 2021


On Tuesday, 23 November 2021 at 07:55:45 UTC, Timon Gehr wrote:
> On 12.10.21 23:38, Timon Gehr wrote:
>>> * Features you'd like to see in D
>
> Another thing I have sometimes wished for, but forgot to 
> include:
>
> - package and module templates

What do you mean by that?

Something like this? Or?

```d
module main;

import a!5;

void main()
{
	auto foo = new Foo;
	foo.field4 = 10;
}
```

```d
module a(int fieldCount);

import std.string : format;

class Foo
{
	static foreach (i; 0 .. fieldCount)
	{
		mixin(format("int field%d", i));
	}
}
```


More information about the Digitalmars-d mailing list