[OT] Move semantics in a nutshell

Timon Gehr timon.gehr at gmx.ch
Tue Nov 11 21:56:29 UTC 2025


On 11/11/25 18:35, monkyyy wrote:
> On Monday, 10 November 2025 at 16:53:28 UTC, Timon Gehr wrote:
>> ,,,
> 
> The unknowable behavior is running 1000000 lines of code written by 
> 10000 people, and thats the cause of the ransom ware.

Sure, and specs are shorter, so if you can get code to comply to the 
spec and if you only have to rely on the spec to interact with the code, 
then that keeps complexity at bay to some extent. It will not fix 
everything, but it just has to improve the status quo.

You don't have to naively believe every idea either solves all problems 
or is completely useless.

> ...
> ez as `1/0==int.max`, yes, I know what a math book would say

It certainly would not say that `a/b` means "divide and round to the 
next integer towards zero except if `b==0` or the result does not fit 
inside the data type then crash".

> and have seen a calculator. Cut the Gordian knot.

You don't actually have solutions that are analogous to cutting the knot. x)

Also note that quite a bit of the complexity is due to 
social/legal/political problems.

Anyway, if you are at it, fix `%`. `x%0 == x` at least makes sense.


More information about the Digitalmars-d mailing list