« first day (82 days earlier)      last day (4852 days later) » 

4:01 PM
@John let's reformulate it: I will never upvote an answer that says getline is a global function, even if the other parts of such an answer are all fine
 
I prefer objects with namespace scope and static storage duration to singletons.
 
@litb: Is an answer "good" because it extolls good programming practice, or because it extolls technically correct terminology?
2
@Charles: Me too. I also prefer structs with nothing but public member variables to classes with umpteen getters & setters
 
@John it's good if it extolls both :)
 
@litb: fair enough. i dont share that opinion, but you're entitled to it.
One does not need to know correct terminology to be a brilliant programmer
 
i think i agree to that
but i think one needs to know correct terminology to be a brilliant teacher
 
4:10 PM
In fact, this is debatable, but one may not even need read the Standard to be a brilliant C++ programmer at all
 
empirical evidence suggests knowing correct terminology is reversely correlated with being a brilliant programmer
 
What's a variable in C++ again?
 
this question needed clarification, but should it have been closed so fast?
 
i think one needs to read the C++ Standard to be a brilliant C++ teacher
 
@CharlesBailey: the opposite of a constant... oh, wait
 
4:11 PM
@JohannesSchaublitb Necessary, but not sufficient.
 
@CharlesBailey i think i remember an answer claiming function names in c++ are variables. therefor i didn't upvote it (maybe i even downvoted it).
 
I don't think it's necessary either
 
@CharlesBailey indeed
 
(@JohnDibling: I notice you were one of the closers, so I guess I'm also asking you directly in addition to asking in general)
 
"I have my PDF reader know all the C++ Standard. Therefor I now don't need to rent a C++ teacher anymore!"
@CharlesBailey actually the first thing i wanted to comment is "common english does not agree const int a = 0 is a variable, but c++ says so". but i'm not sure about common english :)
 
4:14 PM
@Fred: I was the first vote to close on that. Maybe I jumped the gun a bit, but I've seen so many of these questions -- vague and undefined by a first-time poster -- that never get clarification even if there are comments and answers, that my SOP now is to immediatly vote to close. Let others follow my lead or not depending on if they agree with me.
 
@FredNurk I disagree, a brilliant teacher will have good knowledge of primary sources so that he can teach with knowledge and authority and demonstrate how his teachings are justified.
 
How long should we let these questions remain before closing them?
@Charles, @Fred: In addition, a brilliant teacher should also have a good knowledge of secondary sources, such as the ARM
In order to understand the motivation & history
 
@CharlesBailey: so much of teaching a language is often teaching programming itself that I bet there are some great "C++ teachers" that have not read the standard; however, I've not met one and likewise (as you) believe anyone interested in excellence here would read the standard, but I'm very leery of saying it's logically necessary
 
teaching c++ with only having read books is like playing Chinese whispers
 
@litb: Uh, what? :)
you lost me with your reference
 
4:18 PM
@JohannesSchaublitb: what would you say is in the standard and not in TC++PL which would be important to be a "C++ teacher"?
 
@FredNurk Brilliant is a superlative and when you apply it to C++ teachers implies something pretty lofty. There are probably excellent teachers of programming who know C++ without having read the standard.
 
@FredNurk i have never read TC++PL so i can't answer
 
@John: I suspect it's a game similar to what is called "telephone" around here, where you pass a message in serial by whispering, then compare the result after ~20 people to the original
@CharlesBailey: mayhaps we need a technical spec to differentiate "brilliant" and "excellent" so we don't all go making the same mistake as using "global"
 
bjarne has a specific interpretation of the c++ standard. the teacher has a specific interpretation of tc++pl, and then the pupils have a specific interpretation about the teacher's saying. that's so much indirection and source of bugs
 
"inline is just a hint to the compiler." Mutter, mutter.
 
4:21 PM
lol
i think the c++ teacher we had in bachelor science can't be worse
 
@JohannesSchaublitb 90% of anything is crud, including teachers
 
when i asked him what the diff of void f(void g()); and void f(void (*g)()); is, he said that the latter is deprecated, and the former should be used because it doesn't use pointers and is more in the spirit of c++'s references
 
my first C++ teacher (which was in high school) knew less about the language than I did, but to be fair, he was the most qualified candidate the school could hire for the AP CompSci course (it later switched to Java)
 
@JohannesSchaublitb Eh?
 
4:25 PM
I think everyone has a story about a teacher not knowing what they're teaching :)
 
@Charles his MSVC++v6 didn't accept the former, and he concluded that "MSVC++ can't cope with modern C++"
 
but it's also easy to overlook the base facts themselves are only half, or maybe less, of the story
well, the conclusion was spot on! :)
 
@JohannesSchaublitb Many people reach a correct conclusion with false reasoning in all areas of life.
 
(worth to mention that it was 2006)
lol
 
using msvc6 in 2006 wasn't enough indication for you? :)
 
4:27 PM
At my last job VC6 was our main compiler as late as 2008
 
teaching rarely involves dealing with real legacy code
(and I feel your pain)
 
My last major project as the dev manager was to port 1.3 million lines of code from VC6 to VC9
That was fun. :)
 
i also found him on usenet asking (during the time he teached us c++) why "calling d.f() why doesn't it find f declared in base class and tries calling f(int) declared in derived class?". too bad i didn't know the usenet world at 2006 yet! haha
 
that issue trips up many doing productive work in the field (i.e. can't claim academic isolation)
 
4:32 PM
@FredNurk Isolation from academics? That's a good thing, no?
 
no, I mean someone in academics can claim isolation from the rest of the world using the language, at least moreso than others
"From the 19th century it has been used to designate a world or atmosphere where intellectuals engage in pursuits that are disconnected from the practical concerns of everyday life. As such, it usually carries pejorative connotations of a wilful disconnect from the everyday world..."
 
@litb: here you go :) "A static class member variable is of course a global"
0
A: static member functions and thread-safety

CashCowNo you are not correct. And yes, C++ does very much overuse the word "static". A static class member variable is of course a global with the class acting as a namespace scope and with some access privilege differences if it is private or protected (can only be accessed by the class). However a ...

 
@JohnDibling: what other differences are you thinking of, regarding another answer there? the only ones I can think of just now stem from that basic difference
 
Note that I've deliberately quoted out of context in order to increase the agitation factor :)
 
@JohnDibling oh what's he saying. that's horrible
 
4:45 PM
0
A: static member functions and thread-safety

Maxim YegorushkinThe only difference between member function and a static member function is that the former is passed a hidden extra argument, which you access using this keyword. Hence, both member and static member function (as well as any regular function) can create objects where they please: on the thread'...

 
@Fred: I'm not challenging that answer, as I didn't really read it careflully. I'm just getting @litb's goat. :)
@Fred: Oh, that
 
I mean a different answer (which I linked) than the one you linked, unrelated to "global"
 
Right, one sec
@Fred: Primarily, I'm referring to a static method being callable without an instance of the class. This perhaps was what the poster intended to relate, but it was unclear.
 
yeah, I'd say that's really the same difference as not having an extra/hidden argument
 
@Fred: The rest of the response was also vague & generalized enough to not be helpful. Both these things together are why I -1'ed
@Fred: Maybe, and I might agree as well. But if OP needs to ask a question such as this, they may not be able to make the connection.
 
4:49 PM
@FredNurk Sorry: </joke>.
 
@CharlesBailey tone conveys so poorly over text :)
 
@John i wonder whether i should downvote it. but i think i will leave it alone, because from the context it's clear that he's talking english not c++
 
@litb: I didn't read the answer carefully enough to evaluate it's actual correctness
 
i downvoted it first for a short while. but then i undid my downvote
 
litb, gaming the fgitw and display order!
 
4:53 PM
i hate that now when someone adds a comment saying the terminology is not correct c++, and the answerer turns out to be a retard and claims it's correct c++, i cannot downvote it anymore
i should try and don't do such tentative downvotes
 
or just not downvote :P
 
Yeah, John Dibling does that all the time.
 
@Maxim: does what? if you came here just to argue, I'll lose any sympathy
 
@Maxim: What do I do?
 
You don't read answers carefully enough and then declare them incorrect or irrelevant mate.
 
4:56 PM
lol
 
Try comp.lang.c++ just for fun )
 
@Maxim: I do sometimes. I'm human after all. But I do try to be dilligent about correcting my mistakes when I discover them. Can you point me to instances where I was wrong?
 
That answer regarding static member functions and objects.
 
Gasp human?
 
Okay, life has moved on already )
 
4:58 PM
This isn't the room for an argument, you just get abuse. en.wikipedia.org/wiki/The_Argument_Sketch
 
@Xaade I long ago decided anyone over 10k rep no longer qualifies as "human"
 
I'm beginning to wonder if the 20 rep to chat was an actual achievement.
 
@Xaade or a curse?
 
BTW what is the sense in requiring 50reps to comment and 0 reps to answer!?
 
5:00 PM
I expected something more, stimulating, than say Yahoo! teen chat....
 
@Xaade it proves you can string together words in a way 2 people understand them – but doesn't prove you did it better than a markov chain could
 
is the latter some kind of necessary evil?
 
@JohannesSchaublitb: it purportedly reduces "thank!" and "me too" comments
 
I random prefer, it because job does a better!!!
 
or did you miss that if you have no rep, you must either ask or answer to get rep? and people finding questions to answer is better than making up questions to ask
 
5:01 PM
@CharlesBailey why did you delete your elaborate answer :(
 
@JohannesSchaublitb I thought I'd misunderstood what you were saying.
 
@Maxim: I'm sorry you were offended by my d/v. I felt that I had clarified my reasoning somewhat. If you think I'm wrong , take me up on it in the comments. I think you'll find me to be engageable on a civilized level, and I will remove downvotes when I'm wrong.
 
I found myself answering opinionated questions, since I know too little of connecting web access clients to ping off of port routed through php connections on an Andriod phone.
 
opinionated questions are easier to answer, just look at the top-voted questions
 
5:03 PM
Unfortunately, you get no rep for learning.....
 
@Maxim: You might also find that it seems like I do that "all the time" because I'm one of the few people who own up to and explain all my d/vs
 
@John Dibling someone that sensitive to downvoting, is too concerned with how well his answer is approved of, rather than how well his answer is formed or how useful it is.
I find that doing the right thing in the CompSci industry is too often met with the criticism of people who's goal to to be found doing the "right thing".
 
@Xaade you'll find you become sensitive to disagreement with your own answers, while it seems blown out of proportion when others behave so :)
 
@Fre
Hmm.... does it take a while for edits to go through?
 
sometimes posts fail and you get a retry/cancel message
if you edited that "@fre", I think it's been completely lost
 
5:18 PM
When you let experience create sensitivity to correction, you let experience become pride. When you are prideful, you stop learning.
I don't claim to be proficient at escaping pride, because your previous @Xaade ironically drew that same sensitivity.
 
22 mins ago, by Xaade
Gasp human?
that is all I'll say :)
 
@Xaade: @Fred's comment about sensitivity to d/vs?
 
Hehehe. Yeah. I'm sensitive to his reflection about being sensitive. Proving he's right. That's not my point however. My point is that you don't have to let that tug on your heart create an inflamed response.
We have time to think out our answers, because we type them.
Speak little and make it count.
That's rep that this site can't track.
 
@Xaade: For someone who claims to have much to learn about being prideful, you speak very wisely. :)
 
@JohnDibling: behind a keyboard. My mouth doesn't restrain itself as much as my (fingers?).
"The tongue is an unruly member."
 
5:28 PM
OK, programming question maybe unworthy of a post. Does VC10 use any environment variables to find #includes?
"Along the paths specified by the INCLUDE environment variable."
 
Interesting. I always just use project settings.
 
"In the directories of any previously opened include files in the reverse order in which they were opened. The search starts from the directory of the include file that was opened last and continues through the directory of the include file that was opened first."
that is insane
 
... Does that count for includes that redirect to includes?
 
I suspect you can build a turing complete language out of that, #pragma once, and symlinks
 
@Xaade: I usually do to, but in this case I don't want to. The directory where I have some things on my hard drive is different than it is for other people in my shop
 
5:32 PM
Where would you define the #INCLUDE#?
or $(Include),
 
@Xaade: in the IDE's environment, which you can change for the shell, then restart the IDE
 
In the computer's environment variables. In Win7 you get there via Start>Control Panel>System>Advanced system settings>Environment Variables...
 
for the command-line compiler it's even simpler :)
 
Oh, that's different than what I was thinking of. How do you reference environment variables?
 
usually %name% in windows, but it depends what's interpreting your text
in this case you wouldn't reference it, the compiler would simply use the value
 
5:36 PM
Currently, we're using an addon to add include directories, when we compile. Which seems backwards to me.
 
I'm very surprised you find a need for that
 
We do a lot of things "batch" style. Overuse login scripts.
 
if a project needs headers not installed on the system (or a different version where they're incompatible, etc.), I use a project-specific include directory (can simply be the same directory containing the project's headers, depending on organization), then symlink entries pointing to where those other headers are installed
this is one reason why all external headers should be in a directory: just link that directory and you're done; upgrading or testing out a new version or drop-in replacement can be as easy as changing a single symlink and rebuilding
 
Alas, I'm, not getting the %INCLUDE% thing to work...
 
should be easier to test in cmd
(if I had windows here, I'd test, but sorry :P)
 
5:45 PM
@Fred: test how? using something like "which"?
i dumped my env variables, and it's there
meh, i foudn a better way anyway :)
 
mkdir d; echo '#include "header"' > test.c; echo 'int main() { puts("Hello, world!"); return 0; }' > d/header; INCLUDE=d; cl test.c && test.exe
 
whoa, a MSVC one liner!
 
d\header instead, but you get the idea
just verifying the documentation
 
that is cool
 
hai guys
 
5:50 PM
I also can't remember how echo deals with quotes (since it's not the shell, cmd, that does it); that part is probably wrong
@DeadMG hey
 
been toying around with a new idea and I wanted to ask if it was a good one
a temporary object stack
like, a version of the normal stack, but dynamically allocated
so that if you had, say, a vector, just for temporary purposes, you could allocate off the temp stack instead of the actual heap
 
@DeadMG: you mean where even automatics are dynamically allocated?
 
no, no
 
have you seen memory pools and special allocators? (i.e. vector's second template parameter)
 
yes, I've seen and used the STL allocators
they're hideous cause they're always the last parameter
you don't want to see the code that constructs a std::unordered_map with a custom allocator that isn't default constructed
 
5:54 PM
named parameters, both for function calls and template instantiations, are one of my top 5 c++ wishes :(
 
oh yes
 
:( because it won't happen anytime soon, at least not in "C++"
 
well
technically speaking, it will probably never, ever finish
but I continue to spend five minutes a day writing my own language
 
fwiw, you can use a rebind mechanism to achieve this easier
 
well
if MSVC had variadics
 
5:55 PM
that's even required if you don't want to spell out default values
 
I'd just write my own unordered_map wrapper that has the allocator as the first param
 
that's exactly what a rebind could do
except you don't implement or wrap unordered_map, you provide a nested typedef that replaces the allocator parameter
 
oh yes
 
i.e. templated typedefs, as I understand them, in c++0x
 
no, no
that only works for the template parameters
 
5:57 PM
the allocator type is a template parameter :)
 
the actual constructors have it as the last param too
so if you want non-default-constructed, then you also have to pass in std::hash<>, std::equals<>, allocator(args)
whoops
std::hash<T>()
 
unordered_map doesn't have an overload that just takes an allocator parameter?
 
nope
just like std::hash isn't required to hash custom allocated strings
 
vector, et. al. do; and they have to because c++ doesn't have named parameters
 
surprised me when the msvc stl guy came back and said actually, we don't have to hash custom allocations
which amazed me
that must be a defect
 
5:59 PM
I'm less familiar with a lot of tr1
but that also amazes me
 
he referred to N2335 or whatever the latest draft C++0x is
not TR1
 
@DeadMG n3225.pdf
 
that one
 
not terribly familiar with 0x either :)
 
I was also thinking of a new super-awesome kind of cast
which would be called the auto cast
it would be similar to inheritance, except the conversion operator is defined by the programmer
 
6:02 PM
can't you do that now?
 
so, for example, if you write a smart pointer cast, if you auto cast to T* rather than overloading operator->, you can have operator->* for free
nope
 
you mean conversion, not cast
 
if you have implicit and explicit casts, you still have to actually cast
 
there are no implicit casts
 
yeah
whoops
whereas with inheritance, you can't inherit from primitive types, you can't define the conversion function yourself
and, more importantly, you can't convert derived value types to base reference types
whereas with auto cast, you could easily define proxy objects for references
for example, if you take the return value of std::map, and the key doesn't yet exist, and you assign to it
you could construct the new value with the argument to the assignment operator
removing the need for a default construction
but you can still act on the return value of operator[] as if it was a value
eh
reference
 
6:05 PM
actually, I'd prefer python's separation of getitem and setitem
e.g. m[k] = v would call a different function than f(m[k])
 
Lua uses that system too
but then, I think it produces too many ambiguities
because assignment is hardly the only thing you can do with m[k]
do you want a new function for m[k].f()?
 
m[k].f() uses the moral equivalent of getitem(m, k).f()
 
ok
so now I do m[k].f(v), where v is taken by reference, and f assigns *this to v
now I completely subverted the system
 
nope
 
oh wait
I mean *this = v, not v = *this
 
6:10 PM
I realized that, still nope :)
 
why not?
when you call my member function, it doesn't fit neatly into get and set
I can do whatever I like within it
 
so what?
 
you can't know in advance just because I did or did not assign to m[k] whether or not I'm getting or setting
or neither or both
 
I don't even need the easy trapdoor of "that's how the system is designed to work, you can't subvert it like that, by definition"
differentiating into getitem and setitem doesn't imply that items are, except from setitem, immutable
e.g. m[k]++
 
or, of course, I could just overload the assignment operator to assign the other way
unintuitive and horrific, but not illegal
 
6:13 PM
hmm, setitem could be called "operator[]=" :)
 
lol
I think auto cast is a better idea because it's more flexible
 
the potential for smilies in code with operator[]=() is abundant
 
lol
oh
completely forgot
never finished talking about my object stack :(
it's not just another pool allocator
the objects don't require freeing or deleting
instead, they're destructed when a specific helper object is destructed- it unwinds the stack to a certain point
 
that's one way pools normally work, though sometimes people call that "arenas"
 
hmm
I've never seen another allocator that operates that wayt
thought it was entirely my own original idea :cry
 
6:17 PM
write one, then wrap it up in a std allocator inferface :)
 
I already wrote it
 
creating it in a std allocator interface though is going to be substantially harder
as mentioned, the Standard doesn't exactly do well for custom allocators
 
6:44 PM
hi there
 
7:13 PM
"odr-used" from the latest WD is going to be fun
 
7:57 PM
hi again
 
8:07 PM
Hello
 
now I've completely forgotten what I was gonna say
 
8:20 PM
the benefit of online chat is you simply look studiously busy when that happens, instead of standing there with your mouth open (not that I know anything about the latter)
 
sbi
@DeadMG You were going to explain to me what "GG OP no re." means.
 
sbi
@FredNurk Call me dense, but I still don't see how this applies to my comment.
 
I can't say for sure, but I read it as interpreting what you wrote as saying "gg no re"
 
hello @everyone
 
8:29 PM
Everyone hasn't been in here in a while.
 
they've been afking
oh
GG OP no re doesn't refer to the original poster
 
@sbi: this might be a good addition to your c++-faq, needs cleaned up, but I can't see a straight duplicate and it's fairly straight-forwardly asked (many typeid questions are about much more narrow cases)
 
it implies that the strategy you used was overpowered and I will not accept a rematch for this reason
 
ah
 
@DeadMG How does one pronounce that? Gopnore?
 
8:31 PM
I usually just say ge ge oh pe no re
 
sbi
@FredNurk What?
@DeadMG What?
 
lol
 
it's a term from strategy gaming
 
away from keyboard
 
sbi
@DeadMG I've understood that much. Can you please, for this grumpy old man, tell in layman's terms what it means in this context?
 
8:32 PM
it means that you win in such an incredible fashion that I cannot compete
 
gg = good game?
 
@sbi: lol, I forgot to link and you must've thought I was talking about this conversation :)
note to self: copying to clipboard is not pasting
 
@FredNurk Not many questions get asked about how typeid works.
A question on "how can I get reflection in C++?" would be a frequently asked question, though.
 
sbi
@DeadMG 'kay. And how does that refer to my comment? (Sorry for being dense, but I've had a long day, trying to build on the model train of one of my son's, while a sick child was constantly getting under my feet, later picked up more of them, fed them dinner, and just bullied them to bed. I'm exhausted.)
@FredNurk I thought so, but wasn't sure. I'll look at the link now. (Just: This isn't my FAQ. Really.)
 
@JamesMcNellis people really ask about ios flags, aggregates/pods, and how many versions of the standard exist that much more often?
@sbi: I didn't mean solely, but reading meta you seem interested in it as much as anyone else
 
8:38 PM
@FredNurk Aggregates/PODs? Yes (almost always indirectly or as a follow-up in a comment). The other two, no.
 
@sbi: Oh. I can see how it would be confusing. The context means that I can't compete, but the guy that you just owned can't compete. Because his comment was so incredibly stupid.
 
@JamesMcNellis: maybe I'm misunderstanding along the lines of Steve Jessop's comment on the aggregates question
and "there's those types of questions no real newbie ever asks, yet their answers apply to real questions asked very often"
 
@FredNurk A better question/answer than the IOS flags one would be one that explained how to properly do I/O. GMan's answer to that question explains it briefly but it could be better.
 
sbi
@DeadMG Oh boy. Here's a proposal: I read that as an agreement to my comment and we let the matter rest. Shall we?
 
@sbi: That's exactly what itmeans, so sounds good
 
8:42 PM
@FredNurk Ok, but even then, how frequently is typeid the right answer? (FWIW, I don't recall ever having used typeid in production code.)
 
sbi
Anyway, I'll drop out. I can hardly keep up with reading messages anymore, let alone understanding anything. afk
 
@JamesMcNellis: I often ask myself that about many things in C++. Like const.
Oh, I used typeid() recently, although my code is hardly production. I had a base class, and then mapped typeid(derived).name() to set<base*>, effectively maintaining a list of all derived types that the template was called for
 
Well placed const, statics, and private, replaces the need for full documentation in code. Poor use of const, etc, requires more comments than will ever be found in documentation for the code.
Some people find that const-casting defeats const.
 
@JamesMcNellis I think most don't use it because they simply don't understand it (well, and the name() could be much more helpful...), and even though those that understand it may not use it frequently, understanding what it does and how it does that is important to know when to use it
 
I find that const is useless without const-casting, because const is just documentation.
 
8:46 PM
I was wondering... ( and sorry to interrupt your discussion ) - what do people think about the strategy of throwing oneself into learning an easier object orientated language and then returning to C++? has anyone done that here and found it to be useful?
 
if you want to understand several key boost libraries, you need to know typeid, for example
 
const_cast doesn't defeat const, it can enhance it, just like friends can enhance encapsulation.
but encapsulation is a fundamentally useful thing
const isn't
more than that
you define some variables and functions private, and you're done
 
C++ isn't object oriented. So anything gained by using OOL would be near useless in learning C++
 
const is fundamentally useful once you add c++-style overloading, which I don't think is going away in c++
 
but you spend your life maintaining const
 
8:47 PM
@Xaade c++ doesn't claim to be solely OO, unlike some languages
 
@Xaade, but aspects of it are OO right?
 
@BeeBand it can be used in an OO way, yes
 
@BeeBand: Yes- but it's far from OO-exclusive. There are many, many tricks applicable in C++ that cannot be done in just any old C-family OO language.
 
@Xaade if you don't find const_cast to be rare (and mostly useful when dealing with legacy interfaces), then you're probably doing something wrong
 
@BeeBand to an extent. But C++ requires design patterns to achieve the same effects as many features in OOL, so you'd have to learn the design patterns to replicate things learned from OOL. Using OOL won't help you learn C++, but it may improve your tools when using C++.
@BeeBand: read tools as, inspiration
 
8:50 PM
@Xaade example please.
 
@DeadMG right. I'm wondering if I'm better off diving into OO Python and then coming back to C++ armed with that OO knowledge. and then maybe in a better position to use the various other nooks and crannies of C++.
 
@Xaade: remember that half of what const_cast does, adding const and volatile, is performed implicitly
 
sorry nooks and crannies is not the right phrase. i mean features
 
@BeeBand: No, not really. If you want to learn C++, learn C++. It's a perfectly competent language in OO and you can learn OO in it just fine.,
 
@BeeBand: I recommend learning Python, but OO there is mostly the same as in C++
 
8:51 PM
@wilhelmtell: Interfaces in C#. You can accomplish this in C++ by making an abstract class and implementing the methods in another class using inheritance (inheriting from the abstract class). However, you'd have to learn the design pattern, whereas C# does that work for you.
 
@Xaade i see. good example.
 
@Xaade: How, exactly? You make an abstract class, and you inherit from it. C# having an interface keyword is no different to marking each method =0.
 
@Xaade I don't understand. What is the difference other than the existence of an interface keyword in C#? In C++, you just use a class; there isn't a need for a distinction between interfaces and classes because C++ supports multiple inheritance.
 
@Xaade ok so I'm not sure how you define the term "design pattern".
 
Hmm... you guys are thinking reversely from what I'm saying.
 
8:53 PM
@wilhelmtell I think he means OO tool
 
@Xaade: I don't understand what you're complaining about there, is it that you type 'class' instead of 'interface' and concrete methods aren't prevented by the compiler?
 
@Xaade The only difference between C++ interfaces and C# interfaces are a syntactic difference, in which in C++ you say =0 in one of the methods, whereas in in C# you use interface instead of class.
 
Ok, oversimple example.
Let me rephrase.
1. Learn C#. You learn how OO works.
2. Try to use C++.
 
1. No.
 
3. Realize the keyword interface doesn't exist
 
8:55 PM
@Xaade no. That's wrong.
 
4. Go figure out how to implement the idea in C++.
 
@Xaade that's very, very wrong approach to do things.
 
That's my point.
 
You learn how C# works. Not OO. C# doesn't implement all OO- for example, private virtual methods.
 
The question was, is it worth my time to learn an OOL to better understand how to use C++
 
8:56 PM
No, not at all.
 
yes that was the question
 
The answer is No.
Because you'd have to relearn how to implement in-language support for OOL features, by learning the design patterns that accomplish the same thing in C++.
 
riiiiight. yes ok i understand. @Xaade you think it'd be a waste of time because I'd have to end up reimplementing keywords
Hmm.
 
However, it might give you inspiration to start digging for ideas. But it won't help you learn.
 
hmm.
 
8:57 PM
@Xaade ok listen, for this matter C++ is not an object-oriented language. That's it. C++ is not oriented around objects.
 
@BeeBand: you should learn multiple languages (but not to "better learn OO"); I would not listen to Xaade's comments above
 
is this true? oh god i feel really stupid now.
 
:231559
 
@wilhelmtell Object-oriented programming is one of the many paradigms supported by C++, though.
 
@BeeBand: about half of what OO means is marketing gobblygook from the early 90s. that is not helpful to you, and you simply have to learn how to cut through it if you want to understand OO
 
8:59 PM
BeeBand: It's more than that. C++ has, for example, totally different memory management and best practices. You can't just take a C# inheritance hierarchy, change a few keywords, and call it good C++.
 

« first day (82 days earlier)      last day (4852 days later) »