219 reputation
18
bio website doublewise.net
location Colorado
age
visits member for 3 years, 4 months
seen Dec 8 at 19:53

Sep
18
comment Is this a good design in C++?
RVO is irrelevant here. Return-value optimization only applies to situations where the source of the return value will not exist after the function returns. Here, you are returning a member variable, so the compiler will not be able to apply return value optimization. It will, however, be able to apply move-elision to eliminate the second copy into the target.
Aug
12
awarded  Autobiographer
Mar
15
comment Why does the boolean type in C++ support `++` but not `--`?
It exists because there were some people who set a boolean value by incrementing it when programming in C. C++ was designed to ease the transition from C, so they supported it with the bool type. I was just trying to give a historical example of when people actually programmed this way.
Mar
15
awarded  Yearling
Mar
15
answered Why does the boolean type in C++ support `++` but not `--`?
Mar
9
awarded  Commentator
Mar
9
comment What are your decision critera in C++ to make something a data member or virtual method?
@umlcat Most classes add no overhead with optimization turned on
Feb
14
answered A question regarding linked list vs vector insert/remove results comparison
Jan
5
comment Is it illegal to rewrite every line of an open source project in a slightly different way, and use it in a closed source project?
@apsillers That sounds like a fair assessment. I wasn't trying to suggest that a clean room approach would eliminate patent liability. However, the law is that if you are aware of a patent and infringe it, you are liable for greater damages (because the infringement is willful). Therefore, some people try to limit their knowledge to limit potential liability.
Dec
13
comment Does anyone prefer proportional fonts?
I use Verdana 11 for all of my coding
Dec
12
comment Why does Microsoft have such a bad reputation with the people involved in open source?
Copyright law and software patents is the government getting involved in a free and open market. Regardless of whether you think that involvement is justified, it seems to me that those advocating for strong copyright protections are more in line with communism than those advocating for less regulation.
Dec
12
comment Is it illegal to rewrite every line of an open source project in a slightly different way, and use it in a closed source project?
What you describe is not a defense for copyright, but rather, patents. The "clean room" approach allows you to use the defense that the people implementing the algorithm could not have copied the patented work because they were not exposed to it. This does not actually remove any liability; it just reduces it. However, that only applies to patents. Copyright is applicable and carries the same penalties regardless of how you violate it. In theory, I could randomly generate a copyrighted work and still be found in violation of copyright law if I distribute something that is copyrighted.
Oct
26
comment What functionality does dynamic typing allow?
"A Python 2 static type checker would reject the Python 3 code (and vice versa), even though it would never be executed. My type safe program contains a static type error." Sounds like what you really need there is some kind of "static if", where the compiler / interpreter doesn't even see the code if the condition is false.
Apr
24
comment Why would I learn C++11, having known C and C++?
@yatisagade C++ is a multi-paradigm language that doesn't enforce virtual functions for everything, and my programs in C++ are similar. Parts of it use object-oriented design, parts of it are functional, etc., depending on what solves that particular sub-problem best. I appreciate C++ for adding the object-oriented style, and I appreciate C++11 for greatly expanding support for functional programming.
Sep
13
awarded  Teacher
Sep
13
answered Recursion without factorial, Fibonacci numbers etc
Aug
10
comment Rewriting IBM assembler + COBOL in C++
I feel very comfortable programming just about any problem in C++. I'm currently writing a poker AI in Python as a way to learn that language, but it's definitely not at production level yet. Other than that, my only experience with Python was to use it to call C++ programs on various files, because file system support was much easier in Python than C++ when I did that. Python may be a better language in theory, but I don't think that my skills in Python would do it justice.
Aug
9
awarded  Editor
Aug
9
revised Rewriting IBM assembler + COBOL in C++
gave reasons for why I think I should do the job
Aug
9
awarded  Supporter