Reputation
631
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
2 4 9
Newest
 Yearling
Impact
~46k people reached

  • 0 posts edited
  • 0 helpful flags
  • 66 votes cast
Jan
14
comment Why is it good programming practice to limit scope?
Reduces the number of mistakes you can make. If you aren't supposed to use it outside the scope, then make it impossible to do so, and you can't make that mistake.
Dec
20
comment Is “StringBuilder” an application of the Builder Design Pattern?
Not all of the GoF patterns stand the test of time. I'm not sayin', I'm just sayin'.
Oct
21
comment No central database
Security requires Confidentiality, Integrity and Availability. I.e. Keeping secrets, preventing unauthorised modification, and preventing destruction. The last requires backup of some sort.
Oct
5
awarded  Yearling
Oct
2
awarded  Nice Answer
Oct
2
comment Should I stop using the term C/C++?
@ouah, That's not the first version of C++. The book is from 1988 and at that time neither language was an ISO standard. The current version of C++ at that time was Bjarne Stroustrup's 1985 book.
Oct
2
comment Should I stop using the term C/C++?
@ouah, It looks like Professor Stroustrup missed one then :-) Note that's not allowed in C11 either :-) Pretty sure it was allowed in earlier versions of C++ though.
Oct
2
comment Should I stop using the term C/C++?
stroustrup.com/bs_faq.html#C-is-subset "In the strict mathematical sense, C isn't a subset of C++...However, C++ supports every programming technique supported by C... It is not uncommon to be able to convert tens of thousands of lines of C to C-style C++ in a few hours. Thus, C++ is as much a superset of ANSI C as ANSI C is a superset of K&R C and much as ISO C++ is a superset of C++ as it existed in 1985. Well written C tends to be legal C++ also. For example, every example in Kernighan & Ritchie: "The C Programming Language (2nd Edition)" is also a C++ program."
Oct
1
comment Should I stop using the term C/C++?
@TomDworzanski, stroustrup.com/bs_faq.html#C-is-subset "In the strict mathematical sense, C isn't a subset of C++...However, C++ supports every programming technique supported by C... It is not uncommon to be able to convert tens of thousands of lines of C to C-style C++ in a few hours. Thus, C++ is as much a superset of ANSI C as ANSI C is a superset of K&R C and much as ISO C++ is a superset of C++ as it existed in 1985. Well written C tends to be legal C++ also. For example, every example in Kernighan & Ritchie: "The C Programming Language (2nd Edition)" is also a C++ program."
Oct
1
comment Should I stop using the term C/C++?
It's not the case that "Every program is either C, or C++". Prof. Bjarne Stroustrup says: 'Well written C tends to be legal C++ also. For example, every example in Kernighan & Ritchie: "The C Programming Language (2nd Edition)" is also a C++ program.' stroustrup.com/bs_faq.html#C-is-subset
Oct
1
revised Should I stop using the term C/C++?
added 917 characters in body
Oct
1
comment Should I stop using the term C/C++?
@BЈовић Perhaps you did not understand what I wrote. Why don't you look here to see how in every case it is possible to adapt a C program so that it also compiles as C++. david.tribble.com/text/cdiffs.htm#C99-vs-CPP9
Oct
1
comment Should I stop using the term C/C++?
@BЈовић You are making no sense. They are not "completely different". C++ is a much larger language than C, but it includes almost all of C within it. There are incompatibilities which prevent C++ being a proper superset but they are small, like additional reserved words, a few more casts become necessary, but that is pretty much it. It is almost a proper superset, just not quite.
Oct
1
comment Should I stop using the term C/C++?
@el.pescado Yes. You will find that people do in fact refer to PHP/JavaScript. Why not? The point is to be understood, not to play games with words.
Oct
1
comment Should I stop using the term C/C++?
@TheodorosChatzigiannakis C and C# do not have a subset which is a complete language. One cannot write a program which compiles both as C# and as C without using conditional compilation. With C and C++ you have all the functionality of C available if you add a few casts and ensure you declare function signatures and things like that.
Oct
1
comment Should I stop using the term C/C++?
@BЈовић They disagree with you about the acceptability of a small piece of terminology so you conclude they don't understand the difference and are incompetent. That's a pretty unreasonable thing to say.
Oct
1
comment Stuck on design when attempting to create an object store
Sounds like you need a Manager class of some sort. All objects know the manager. Manager knows previously active object. When a new object becomes active, he tells the manager and the manager tells the old object.
Oct
1
comment Should I stop using the term C/C++?
See my answer below, there are plenty of perfectly good reasons why you might quite reasonably want to use the term C/C++
Oct
1
awarded  Editor
Oct
1
revised Should I stop using the term C/C++?
added 143 characters in body