Printing shortest decimal form of floating point number with Mir
welkam
wwwelkam at gmail.com
Mon Jan 4 21:07:49 UTC 2021
On Monday, 4 January 2021 at 01:19:12 UTC, jmh530 wrote:
> it makes things overly complicated
Just because a feature makes something simpler is not enough of
an argument of why it should be added. Case and point C, lua and
Go languages. They are popular in part because they are simple.
That's why I said that no good arguments came after. This is not
a good argument. A good argument would be one that shows that
benefit is worth increased complexity.
> If you aren't writing templates, then it wouldn't affect you.
I know how to write simple template. I just dont use them
recursively. I find it hard to reason about. Also I'm concerned
about compilation speed and resulting code bloat. Maybe I'm just
not experienced enough
> However, it was deemed beneficial enough that a form of it was
> added to C++ as part of C++ 11
Well D already support that just with different syntax.
struct too_long_name(T) {}
alias bar = too_long_name;
bar!(int);
> I wonder if the inability to do this would inhibit the ability
> of D code to interact with C++ code bases.
The way interop between D and C++ works is that you need to match
function signatures and struct/class data layout on binary level.
Then you just link. There is no cross language template
instantiation and there will never be one. So it will not affect
interop.
P.s. Thank you for a well written post with a link to useful read.
More information about the Digitalmars-d-announce
mailing list