| bio | website | poita.org |
|---|---|---|
| location | England, United Kingdom | |
| age | 26 | |
| visits | member for | 2 years, 7 months |
| seen | Feb 3 at 10:01 | |
| stats | profile views | 183 |
I am a games programmer for Codemasters, living in Warwickshire, England. My hobbies include competitive programming, electric guitar, and online gaming.
|
Oct 26 |
awarded | Yearling |
|
Jun 8 |
awarded | Caucus |
|
May 20 |
awarded | Great Answer |
|
Feb 15 |
awarded | Great Answer |
|
Jan 19 |
comment |
Can any modern OO language compete with C++'s array store performance? @BenVoigt: I have created a pull request to update the documentation. Hopefully this will be resolved soon. Thanks for pointing it out. |
|
Jan 17 |
answered | Can any modern OO language compete with C++'s array store performance? |
|
Dec 22 |
comment |
Deprecation considered harmful? In old GCC you could write a >?= b; which was shorthand for if (a > b) a = b; and likewise for <?=. |
|
Dec 3 |
comment |
What does C++ do better than D? @Mehrdad: Pass in a pointer to it like you would in C++ with placement new? Either that or write a mixin. You're really blowing this out of proportion for something that is very rare anyway. |
|
Dec 3 |
comment |
What does C++ do better than D? @Mehrdad: Wrap it in a function. |
|
Dec 3 |
comment |
What does C++ do better than D? @Mehrdad: You don't have to heap allocate it if you don't want. You can use emplace to put the object wherever you like. The indirection happens for pointers too. There's no difference in cache if you put it where you want it and there's no collection overhead if you free it manually. |
|
Dec 3 |
comment |
What does C++ do better than D? @Mehrdad: Let's be clear here: if you want to, you can use pointers in D just like you can in C++ and they have the same performance. Also, I am unaware of any performance penalty using references vs pointers. The only thing I can think of is v-calls, but that has nothing to do with DeadMG's problem and can be easily avoided by using final class. Finally, DeadMG's problem only occurs in this strange situation where you have value types that are moving around in memory and need to inform a manager object. If you are moving lots of objects around and worrying about a v-call then you have issues. |
|
Oct 26 |
awarded | Yearling |
|
Sep 25 |
comment |
Which to choose, procedural programming or object - oriented programming? @CesarGon: Why do you want to model the real world? The real world is not made for computation. Figure out the data structures and algorithms that work well to solve your problems. That's your model. |
|
Aug 27 |
comment |
Is the C programming language still used? D can call C code directly, just like C++. All you need if the function prototype (again, just like C++). You just write extern(C) in D, whereas in C++ you write extern "C" |
|
Aug 18 |
comment |
Why are data structures so important in interviews? "If you use a LinkedList for everything, that may show you don't know what you're doing" or you're a Lisp programmer :-) |
|
Aug 15 |
comment |
Is C++0x Compatible with C? C++0x isn't quite C++11. It has been approved, but not published. If it is published next year then it will be C++12. Let's hope we don't have to wait that long :-) |
|
Aug 9 |
comment |
What is the “PHP Way”? The wrong way... |
|
Aug 1 |
awarded | Guru |
|
Jul 31 |
awarded | Mortarboard |
|
Jul 30 |
awarded | Good Answer |