Bottom Type--Type Theory

Johannes Loher johannesloher at fg4f.de
Thu Jan 17 05:09:52 UTC 2019


Am 17.01.19 um 01:44 schrieb Nicholas Wilson:
> 
> Yes that is stupid. Does anyone write it now, given that it is already
> possible with LDC/GDC? No, because D is a pragmatic language, just
> because you can write something non-sensical doesn't mean that anyone
> will, especially when you have to go out of your way to do it.
> _We shouldn't be designing around the fact that you can do stupid things_.

I don't completely agree with this statement. If possible, as language
authors we should try to design the language in such a way that it is
impossible (or at least very hard) to do stupid things with it. Of
course we also need to empower the user, but one has to find a good
balance. If something is possible in the language, people will do it,
however stupid it is.

The best example for this is what Walter always brings up:

```
#define BEGIN {
#define END }
```

I am very happy that this is not possible in D!


More information about the Digitalmars-d mailing list