why compiler try use my sqrt not std.math?

KnightMare black80 at bk.ru
Wed May 8 09:20:35 UTC 2019


OFFTOPIC
Dlang is good language but sometimes happens big badaboom (shit 
in other words):
you just sit and write code. almost same code as c++ or c#.
and happens something bad/unexpected in lines where you not see 
any criminal (no typos, no semantic issues). u just write working 
code in your mind-stream, u write such code many times in other 
languages and it worked as expected.
and... BOOOM!.. you are thrown out of the stream.. what happened 
here?

u asked questions on forum and u will get an answer in few hours 
but till u sit and reflection yourself and question of universe:
why author do this way? he had some reason for this.
why other langs do way as I expected? maybe appear some cases 
where this way better than in other langs? OR maybe such things 
works same in other langs and I just forgot it? FK! maybe I have 
alzheimer's disease? I am too young for this shit!..

after 2 such bigbadaboom people lefts Dlang. I can understand 
that.
it like Russian language - u have 1/4 of book rules and 3/4 
exceptions from this rules, u shouldnt understand it, u must 
remember it and that all, dont think, dont doubt!

well, lets write all unclear cases of Dlang in some page (better 
home page)
1) case with sqrt: I compiler prefer func in this file/module 
over func in included module and it ignores types of parameters?
2) why
(string s) { return cast( int )s.length; } typeof is int 
delegate( string )
but
(string s) => { return cast( int )s.length; } typeof is int 
delegate() delegate( string )
3) add more, dont be shy


More information about the Digitalmars-d mailing list