647 reputation
714
bio website
location United States
age 26
visits member for 3 years, 5 months
seen 1 hour ago

20h
comment How do I write an esoteric programming language?
Grab a pencil and write on paper the letters B-E-F-U-N-G-E. You have now written the esolang Befunge. P.S. Esolangs are totally NOT the same as DSLs as your question seems to suggest.
1d
comment Is there a reason to define type aliases in any program
I disagree with that statement... unless you have a really (really really!) crappy compiler. Even naive compilers should have no overhead/difference in machine code here.
1d
comment Is there a reason to define type aliases in any program
C++ can privatize integer types too: class MyHiddenInt { int x; };
2d
comment IS C++ a cross-platform language?
en.wikipedia.org/wiki/Write_once,_compile_anywhere
Jul
26
comment How does polymorphism help a programmer?
* Polymorphism can be achieved/implemented by duck typing. Duck typing is an actual form of polymorphism.
Jul
26
comment How does polymorphism help a programmer?
That's basically it.
Jul
26
comment Why would programmers ignore ISO standards?
To avoid all the decimal separator problems, one should ALWAYS use the following system: 7.5 or 7,5 or whatever would be 7+2⁻¹. All your problems simply vanish. It's like magic.
Jul
24
comment Is it a bad idea to use mutable for pre-allocated temporaries?
Make the member a function argument. const problem solved.
Jul
23
comment Is using MultiMaps code smell? If so what alternative data structures fit my needs?
Just a class whose purpose is bundling members.
Jul
23
comment Is using MultiMaps code smell? If so what alternative data structures fit my needs?
Why not just use structs and hard coded member layout?
Jul
23
comment “Undoing” an integer wraparound
Correction: C int is not guaranteed to wrap around (see your compiler's docs). It's true for unsigned types though.
Jul
23
answered “Undoing” an integer wraparound
Jul
22
comment How can I pass floating point numbers as template parameters?
Make it a global. PS: You can use references instead of pointers.
Jul
15
comment Is it a good idea to “#define me (*this)”?
You just lost my up vote when I read case 3. *this has very good uses.
Jul
14
comment Is it poor form to use C features such as the size_t type instead of their c++, such as std::size_t?
I never write std::size_t fwiw.
Jul
11
comment How can a true Vector be implemented in Haskell?
Use the mathematical definitions for true vectors. Here's a vector space library for you hackage.haskell.org/package/vector-space-0.8.7/docs/…
Jul
10
comment What is a helper? Is it a design pattern? Is it an algorithm?
A helper is any private member, up to isomorphism.
Jul
6
comment How do I deal with classes that are only used once, say in only a single function?
Unless Fast is templated, C++ supports class declarations inside a function. I fail to see the problem.
Jul
3
comment Why are cryptic short identifiers still so common in low-level programming?
Laziness is a legit reason. Almost all programmers are lazy people (otherwise we would do everything manually ooo!).
Jul
3
comment How bad is it calling println() often than concatenating strings together and calling it once?
C++ (even before C++11) is higher level than Java and C. Java and C are at roughly the same level.