Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Object Oriented Programming

Name: Anonymous 2010-09-21 13:22

As a novice programmer and as someone who started learning programming with C, OOP just seems annoying to me. Seems as though it's easier to accomplish the same tasks without it. Is it actually necessary to learn it?

Name: Anonymous 2010-09-29 20:21

>>44
C++ without templates is truly polymorphic.  However, it is limited to first argument dispatch and only has first order polymorphism.  Templates in C++ are merely a way to add type polymorphism to C++, and they're one of the few systems in the world that actually have dependent types.  E.g., in C++ you can define a template for matrices like this:


template<int N>
struct matrix {
    double v[N][N];
};

template<int N>
matrix<N> operator*(matrix<N> const &x, matrix<N> const &y);


In Haskell, doing that is an utter pain in the ass.  You can do it, it just really sucks.  However, dependent types aren't something that people really miss that much when they're gone... not like multi parameter dispatch, rank two types, garbage collection, a proper module system (instead of header files, which suck), higher order functions, closures, lambda expressions, nested functions, etc...  (all of which are missing in C++ (although Cocks will fix it just a little tiny bit), and the hacks that allow you to write "lambda expressions" using templates are really terrible).

>>45
IHBT.

>>46
Okay, leaving.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List