Exceptional coding style
bearophile
bearophileHUGS at lycos.com
Mon Jan 14 15:37:17 PST 2013
Walter Bright:
> http://kotaku.com/5975610/the-exceptional-beauty-of-doom-3s-source-code?post=56177550
From the article:
> [Side note: John Carmack has stated that static analysis tools
> revealed that their common bug was incorrect parameter matching
> in printf(). I wonder if they've changed to stringstreams in
> Rage because of this. GCC and clang both find printf()
> parameter matching errors with -Wall, so you don't need
> expensive static analysis tools to find these errors.]
I'd like the D front-end to statically detect wrong parameter
matching errors for the write*()/format() functions. (In D I
don't use "%s" all the time).
----------------------
H. S. Teoh
> The prevalent hatred for templates is mostly the fault
> of poorly-chosen syntax on C++'s part.
The syntax of C++ templates is a problem, but it's not their main
problem. The main problem is them being untyped. The Rust
language (tries to) remove this problem copying the best parts of
the typeclasses from Haskell, but making them efficient for a
system language. (The redesign of the C++ concepts try to do the
same, but as usual for C++ it will be a greatly over-engineered
solution).
Bye,
bearophile
More information about the Digitalmars-d
mailing list