weird token names?

closed account (Dy7SLyTq)
so this is a serious post (not like my post). i was wondering why they used some of the names they did for c++ or oop in general.
virtual, class, curses (which i know is a header but still), explicit, friend, and stuff like that. btw im not arguing the usefullness of these features, but just wondering why they are called what they are
I think most of these are terms that apply to programming languages in general, not just C++.
I'd think that they are trying to keep them as short as possible.

a virtual function doesn't make too much sense in a natural language...
* class - another name for type (classes in OOP are user-defined types): a class of items,

* curses - a library for managing terminals. I suspect it's named that because terminals have cursors and are annoying to manage. Cursor + annoying ("Curses!") => curses.

* explicit - should be pretty obvious. Explicit is the opposite of implicit, so what is implicitly implicit can be explicitly made explicit.

* friend - classes can have parents (base classes), children (derived classes) and, I guess, siblings (classes with the same parents) and spouses (classes who act as base classes for the same derived class(es)), so why not friends? Someone ("they") wanted a way to allow selective outside access to private members so that we could have class members that were hidden from the general public but

* virtual - pure virtual functions are functions that aren't defined (for the base class), i.e. aren't real. Another word for "not real" is virtual. For non-pure-virtual functions though, it doesn't really make sense.

Any more?
closed account (Dy7SLyTq)
thanks chrisname. idk why i put explicit up there. although just side note, i wasnt asking about how they worked :p
What annoys me is that we pass variables by address with an ampersand while the at symbol (@) remains completely unused.
Hmm... So you'd be reading "int* p = @i;" as "p is aimed at i"?
Yeah, I think it makes more grammatical sense then "p is and i". But then again I've never seen either symbol used outside of American English so I don't know how it comes off in other languages.
Last edited on
Why not go all out?

int -> p = @i;
Topic archived. No new replies allowed.