Re: 1 matches bool, 2 matches long
On Friday, 26 April 2013 at 06:18:29 UTC, deadalnix wrote: On Friday, 26 April 2013 at 06:01:27 UTC, Walter Bright wrote: The real issue is do you want to have the implicit conversions: 0 => false 1 => true or would you require a cast? Yes. +1 What about the implicit conversion for the other types? I could imagine that they could cause similar bugs. Why not get rid of the implicit conversion? How about yet another compiler flag?
Re: Vote for std.process
Please correct me if I'm wrong. It's not the allocation itself that is the problem it's that it will trigger the GC to stop the world at some point.
Re: Disable GC entirely
I just re-read the "Doom3 Source Code Review" by Fabien Sanglard (http://fabiensanglard.net/doom3/) and apparently they don't use the Standard C++ library. "The engine does not use the Standard C++ Library: All containers (map,linked list...) are re-implemented but libc is extensively used." I certainly feel that there is room for improvement, like optimizing the GC, define a GC-free subset of Phobos etc. But it seems like if you're writing really performance critical realtime software most likely you've to implement everything bottom up to get the level of control. Secondly it seems like it's most often cheaper to just throw faster hardware at a problem. "You can do tricks to address any one of them; but I pretty strongly believe that with all of these things that are troublesome in graphics, rather than throwing really complex algorithms at them, they will eventually fall to raw processing power."(http://fabiensanglard.net/doom3/interviews.php) My 2p.
Re: Exception programming difficult
I had times when I missed the Java-style Exception handling. First time I just the D sockets exceptions was thrown during runtime. The Library Reference didn't tell my anything about exceptions neither did the compiler. This could've been avoided with documentation stating which exceptions can be thrown or if the compiler had warned me about it. I see checked exception handling as mean to remind programmers to handle certain errors. This is not done in D. I've also cursed the Java-style many times. For example: interface MyInterface { public void method throws IOException(); } class MyClass implements MyInterface { public void method throws IOException() { //Doesn't need throw IOException } } I liked the idea when the compiler is able to warn me about unhandled exceptions.