|
|
|
|
|
by 10x-dev
1447 days ago
|
|
Thanks Walter, that's a great example and I like that, because parens are optional, it could also be written as e.d.c(3).b.a
which is even cleaner.For those who are thinking UFCS is a trivial detail, consider that the shell and some other languages have pipe operators (|>) to make the code flow intuitively the same way as the data. In my opinion, in a C-like language, managing to squeeze so much functionality out of the '.' operator without any downsides is the mark of a well thought out, elegant language. Thank you for creating D. |
|
For example, in C++, a = b can invoke anything. Not sure it is a good idea (except for generic code, there it is useful).
Zig has a philosophy of nothing hidden that I think it is mostly good.
That said, I find D a very nice language, the only problems are:
1. small ecosystem 2. last time I tried, packaging of download and use was... improvable.