Worst ideas/features in programming languages?

SealabJaster sealabjaster at gmail.com
Tue Oct 12 03:17:08 UTC 2021

On Monday, 11 October 2021 at 15:59:10 UTC, Atila Neves wrote:
> * Worst features implemented in a non-toy language

Everything to do with header files.

> * Worst features (in your opinion) in D

Autodecoding. Autodecoding. Autodecoding.

Mutable by default.

Template errors. (esp. `template instance func(T) where T = 
string cannot be instantiated with T = string`, or something 
along those lines, really, really, frustrates me)

Inconsistent built-in property naming. (As a bonus: historical 

A fear of language solutions because of reasons, leading to 
annoying issues like std.sumtype being a PITA to debug sometimes 
due to bad error messages it can't really do anything about.

`alias this`

`abc => { return 123; }` should not be returning a function that 
returns a function.

> * Features you'd like to see in D

Language support for complex types:

* sumtype and/or tagged unions. esp. in regards to pattern 

* optional types.

* Maybe even a result/value_or_error type.


Taken from C#: Having to specify `ref` and `out` parameters at 
point of usage, not just at definition.

Being able to specify new/experimental functionality per-module, 
a.l.a nullable syntax in C#.

Being able to match structs against an `interface` or other such 
construct. As a language feature since a template version I can 
foresee eating my CPU.

Allocators being better integrated with the language/phobos.

Standard, de-facto interface/library/whatever for things like 
logging, databases, etc.

Object initialisers: 

And most importantly, a plan for D's future and development, 
because personally I have 0 idea where D is trying to go now, 
what it's trying to be, who it tries to please, etc. What is our 
vision? What are our goals and ambitions for the language?

I know it's basically completely infeasible but it's a fun 
thought experiment to think about what a "D3" could be like. 
Learning from the warts of the current language, removing 
historical issues, just a complete redesign whilst still being D.

More information about the Digitalmars-d mailing list