Thread: Superficial Syntax thread: Your favorite keywords/class names etc.

  1. #31
    Join Date
    Dec 2007
    In your nightmares
    Quote Originally Posted by Mario F. View Post
    It's been always my thought that Method and Property usage seem to focus more on the object instance since this is where those nouns make more sense, I think. Whereas member function and member variable make more sense when describing a class... particularly in C++ where the terms pointer to method or friend method don't make much sense at all.
    I heard in a python lecture that a method is a function that operates on an object and a function takes an object or a series of objects. E.g. (I will make up an example):
    :WNDCLASS.hCursor.LoadCursor(NULL, IDC_ARROW); //method, if this existed
    DialogBox(hinst, MAKEINTRESOURCE(DLG_0100), NULL, (DLGPROC) DialogFunc); //Function
    string.split(' ') random python example of a method (not C)
    There are probably better examples of methods in C++, but I haven't learnt it yet. Helps distinguish the difference though. As for a property, this is an example:
    long time no C; //seige
    You miss 100% of the people you don't C;
    if (language != LANG_C && language != LANG_CPP)

  2. #32
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    I'd say objects have methods (hence when dealing with OOP I call them methods) otherwise it's a function.

    But I don't like the terms, "accessor" & "mutator".

  3. #33
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Portland, OR
    I've always liked the term "brittle." In other words, code that may work, but doesn't easily support arbitrary changes either to itself or to the structure of code around it. It's ready to snap in half like a granola bar left to dry in the desert sun.

    As far as the function/method debate, I don't think it's really that important. The term "function" is already far removed from the mathematical definition of a function as a mapping from values to values. Many C and C++ "functions" serve no purpose except for their side-effects, a decidedly non-functional role.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. PlaySound
    By cangel in forum C++ Programming
    Replies: 16
    Last Post: 10-08-2009, 05:29 PM
  2. Simple thread object model (my first post)
    By Codeplug in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2004, 11:34 PM
  3. Replies: 2
    Last Post: 04-12-2004, 01:37 AM
  4. Closing thread handles from within
    By Sang-drax in forum Windows Programming
    Replies: 6
    Last Post: 09-26-2003, 12:18 PM
  5. How to make a thread sleep or std::recv timeout?
    By BrianK in forum Linux Programming
    Replies: 3
    Last Post: 02-26-2003, 10:27 PM