Click here to Skip to main content
15,909,953 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: What is an Object Pin
Member 1008817116-Nov-13 11:12
Member 1008817116-Nov-13 11:12 
GeneralRe: What is an Object Pin
michaelbarb16-Nov-13 14:25
michaelbarb16-Nov-13 14:25 
GeneralRe: What is an Object Pin
Member 1008817116-Nov-13 14:38
Member 1008817116-Nov-13 14:38 
GeneralRe: What is an Object Pin
michaelbarb16-Nov-13 15:32
michaelbarb16-Nov-13 15:32 
GeneralRe: What is an Object Pin
0bx17-Nov-13 2:46
0bx17-Nov-13 2:46 
GeneralRe: What is an Object Pin
irneb5-Mar-14 23:36
irneb5-Mar-14 23:36 
GeneralRe: What is an Object Pin
Marc Clifton17-Nov-13 4:51
mvaMarc Clifton17-Nov-13 4:51 
GeneralRe: What is an Object Pin
Member 1008817117-Nov-13 18:31
Member 1008817117-Nov-13 18:31 
GeneralRe: What is an Object Pin
Marc Clifton18-Nov-13 2:49
mvaMarc Clifton18-Nov-13 2:49 
GeneralRe: What is an Object Pin
Member 1008817118-Nov-13 6:26
Member 1008817118-Nov-13 6:26 
GeneralRe: What is an Object Pin
robocodeboy18-Nov-13 23:36
robocodeboy18-Nov-13 23:36 
GeneralRe: What is an Object Pin
Rob Grainger28-Nov-13 22:39
Rob Grainger28-Nov-13 22:39 
GeneralRe: What is an Object Pin
robocodeboy2-Dec-13 0:53
robocodeboy2-Dec-13 0:53 
GeneralRe: What is an Object Pin
Rob Grainger2-Dec-13 2:23
Rob Grainger2-Dec-13 2:23 
GeneralRe: What is an Object Pin
robocodeboy2-Dec-13 2:38
robocodeboy2-Dec-13 2:38 
GeneralRe: What is an Object Pin
Rob Grainger2-Dec-13 4:14
Rob Grainger2-Dec-13 4:14 
GeneralRe: What is an Object Pin
robocodeboy2-Dec-13 4:30
robocodeboy2-Dec-13 4:30 
GeneralRe: What is an Object Pin
michaelbarb2-Dec-13 8:11
michaelbarb2-Dec-13 8:11 
GeneralRe: What is an Object Pin
Rob Grainger28-Nov-13 4:35
Rob Grainger28-Nov-13 4:35 
GeneralRe: What is an Object Pin
michaelbarb28-Nov-13 12:55
michaelbarb28-Nov-13 12:55 
GeneralRe: What is an Object Pin
Rob Grainger28-Nov-13 22:35
Rob Grainger28-Nov-13 22:35 
GeneralRe: What is an Object Pin
michaelbarb29-Nov-13 2:40
michaelbarb29-Nov-13 2:40 
GeneralRe: What is an Object Pin
Rob Grainger2-Dec-13 2:35
Rob Grainger2-Dec-13 2:35 
Unfortunately, class and instance may be unambiguous (or less ambiguous anyway), but don't generalise well as not every object-oriented language has classes.

Both JavaScript and Self support object-oriented programming in which slots (member variables) and methods are defined directly on objects.

As far as I am aware though, every object-oriented programming language supports objects that hold (ideally encapsulated) data and respond to messages (method calls, member function invocations) in some way. That pretty well sums up the role of an object. The rest is all how particular environments implement that.

I'd dispute that "most often C++ is used in a Microsoft environment". I suspect its used much, much more on Linux and (in the form of Objective C++) on Macintosh and i-Whatever platforms. Its also used in a vast number of embedded systems ranging from phones to mars rovers.

While Microsoft's MFC class library is rooted in Object, their ATL library is not. Apple use an NSObject as the root of theirs (although not every class needs inherit from NSObject).

Most C++ coding actually tends not to use class hierarchies that much - most of the C++ classes I've encountered either do not inherit anything, or from a base class that does not inherit from a common "Object" class. This becomes particularly necessary in the presence of multiple inheritance. Indeed most of the standard C++ library does not even define the base classes. For example, a library must provide a std::vector class, but that class may nor may not inherit from other classes as an implementation decision - it simply has to offer a certain interface (better described in C++ terminology as a Concept). Indeed many objects in C++ are pretty abstract - like iterators, containers, etc. which all behave similarly but have no relationship through inheritance.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.

GeneralRe: What is an Object Pin
michaelbarb2-Dec-13 8:00
michaelbarb2-Dec-13 8:00 
GeneralRe: What is an Object Pin
Rob Grainger2-Dec-13 8:36
Rob Grainger2-Dec-13 8:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.