News for hackers. Stuff that matters.
Re:Not Growing a Language by WalterBright on Saturday April 03, 2021 @03:51PM (#26684150)
I agree that operator overloading should be restricted to math objects. D tries to make it unpleasant to do it for non-math objects. For example, < <= > >= are not overloadable separately, just one function `opCmp` does all of them. Non-math operators are not overloadable.

The D community has generally agreed, and we haven't had much trouble with people overloading operators to do a regular expression DSL, for example.

Re:Not Growing a Language by meltedcapacitor on Saturday April 03, 2021 @07:36PM (#26685698)
Fair enough, but mainstream languages used in broad commercial settings need moron-immunity more than niche languages attracting a select crowd.
Re:Not Growing a Language by WalterBright on Saturday April 03, 2021 @09:40PM (#26686266)
D does not have a huge market presence, but it is not a niche language. It is very capable for a diverse variety of projects. Whenever you get tired of buffer overflows and preprocessor abuse, come check us out :-)
Re:Not Growing a Language by pjmlp on Sunday April 04, 2021 @04:12AM (#26687743)
We still need @safe as default though.
Re:Not Growing a Language by WalterBright on Sunday April 04, 2021 @04:51PM (#26692723)
The buffer overflow protection is so important it is there whether the code is marked @safe or not.
Re:Not Growing a Language by pjmlp on Sunday April 04, 2021 @05:19PM (#26692945)
With @system by default it is harder to track down uses of .ptr