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-23 15:06

>>40
And yet your code is never used. In that sense it's worse than the average example.
You mean because it's not part of a real program? I did do something very like this recently.... At least my code is in principle usable. The manager example I mentioned has no reason to even exist.

Subclassing probably shouldn't even be taught until students have a good grasp of OO. They tend to get the idea that it's something that should be used whenever possible, instead of avoided until you can't help it.

Name: Anonymous 2010-09-23 15:31

>>32
OOP and templates are distinct, unrelated concepts. Your post makes no sense.

I didn't say templates didn't suck. They have a number of design flaws, yes, but they are definitely not "unwanted baggage".

Name: Anonymous 2010-09-23 15:41

Subclassing probably shouldn't even be taught until students have a good grasp of OO.
I feel this way about class creation in the first place, since the over-architecture of classes problem manifests itself there just as much. Then again, if I were writing a tutorial on class definition/subclassing/etc. it would boil down to "save yourself the trouble and go find a proto language instead."

Name: Anonymous 2010-09-23 17:03

>>42
I didn't say templates didn't suck. They have a number of design flaws, yes, but they are definitely not "unwanted baggage".

I'll say it:  Templates suck.  They're a compile-time band-aid for the fact that C++ isn't truly polymorphic.

Name: Anonymous 2010-09-29 18:24

Just try and learn C++.
C++ > C for pretty much anything.

Name: Anonymous 2010-09-29 18:55

>>45
This board is for programmers. Kindly leave.

Name: Anonymous 2010-09-29 20:11

lol i hate interface oriented programming i am so trendy and cool hi my name is hotaru and i use .net

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.

Name: Anonymous 2010-09-29 21:17

>>46
I'm not a programmer, I'm an ENTERPRISE SOLUTIONS ARCHITECT

Name: Anonymous 2010-09-29 22:30

>>48
I have proof[1] that C++ templates are not true dependent types.


[1] http://en.wikipedia.org/wiki/Talk:Dependent_type

Name: Anonymous 2010-09-29 22:43

>>49
BUZZWORD COMPLIANCE: ACHIEVED

Name: Anonymous 2010-09-29 23:36

>>50
Fair, but parameterized types are not supported in very many languages.  They're also not useful that often.

Name: Anonymous 2010-09-30 2:22

To all in this thread: please stop using C++ instead of the proper name, Sepples.

Name: Anonymous 2010-09-30 2:24

The amazing thing is that >>9 is not wrong.

Name: Anonymous 2010-09-30 10:23

Learn Squeak Smalltalk and youll then understand how OO was really meant to be implemented and not OO contorted to fit into C style programming

Name: Anonymous 2010-09-30 10:35

>>55
Durp, if you think Sepples and Java are proper OO then you need to seriously sort your life out.

Name: Anonymous 2010-09-30 10:44

>>56
what part of "Learn Squeak Smalltalk" do you interpret as "if you think Sepples and Java are proper OO"?

Name: Anonymous 2010-09-30 10:51

>>57
OO contorted to fit into C style
I meant the hypothetical 'you', i.e. 'one' in Queen's English and 'man' auf Deutsch. It wasn't meant to be personal.

Name: Anonymous 2010-09-30 11:11

>>55
If anything, Smalltalk just follows a consistent paradigm.  Java and "C-style programming" for OO follows paradigms that skew in a few places from perfect consistency yet remain valid OO.  It sounds more like you favor it because it isn't (as) imperative.

Name: Anonymous 2010-09-30 16:40

Haskell is a medium-sized dog

Name: Anonymous 2010-09-30 18:04

Haskell is a medium sized homosexual.

Name: Anonymous 2010-10-01 2:28

>>61
NO HE'S A FUCKING MEDIUM SIZED DOG

FUCK YOU FAGGOT

YOUR DUM

Name: Anonymous 2010-10-01 4:31

I learned OOP from C++.

Name: Anonymous 2010-10-01 6:30

>>63
Then, sorry, but you don't know shit.

Name: Anonymous 2010-10-01 7:43

Well, you dont have to use OOP for everything. But is a good thing to know.

You can omit OOP for small proyects (for example, if you are a sysadmin you will just write perl scripts).

But for BIG proyects, you better learn OOP.

Some languages, like Java, abuses OOP. So don't use that to learn OOP. C++, or Object Pascal are good tools to learn OOP.

>>62 Accept the reality. He is a medium sized dog

Name: Anonymous 2010-10-01 9:13

what's so hard about oop that you even have to ask this question

maybe you're dumb/lazy?

Name: Anonymous 2010-10-01 10:05

>>65
Back to /g/ please

Name: Anonymous 2010-10-01 10:52

>>65
C++, or Object Pascal are good tools to learn OOP

Oh, please!

Name: Anonymous 2010-10-01 12:45

>>67,68

What's the problem? To learn OOP these are ok languages, in the same way QBasic is an appropiate language to learn very basic programming.

Name: Anonymous 2010-10-01 14:05

>>65
C++, or Object Pascal are good tools to learn OOP.
QBasic is an appropiate language to learn
Who is this idiot?

Name: Anonymous 2010-10-01 14:12

>>69
Java, for all its sins, is a significant improvement over sepples.,

Name: Anonymous 2010-10-01 15:10

>>71
That's true in a general sense, but it's just as bad when it comes to ``learning OOP''.

Name: Anonymous 2010-10-01 15:25

>>71
Wrong. In C++, you can still just ignore classes and OOP and use it as a dialect of C.

Name: Anonymous 2010-10-01 15:35

>>73
In which case, you may as well just use C.

Name: Anonymous 2010-10-01 15:42

or QBasic

Name: Anonymous 2010-10-01 18:10

>>74
Restricting yourself to a limited subset of Sepples — like classes, single inheritance, no templates, no references, no operator overloading — is fine. It's just like using structs and functions but with less boilerplate code, and none of the ridiculous cognitive overhead from Bjarne's ``advanced'' features.

Name: Anonymous 2010-10-01 23:28

>>76
Operator overloading, just like Sepples itself, can be good if used correctly. For example, the string class uses operators in a pretty intuitive way.

And what's wrong with templates?

Name: Anonymous 2010-10-02 1:24

>>77
Sure, if you think that left-shifting things onto a stream to print them is "intuitive".

And what's wrong with templates?
It introduces what's basically an additional language with totally different binding semantics. That's a lot of complexity to deal with.

Name: Anonymous 2010-10-02 9:17

>>77,78
Okay bitches, the FQA is there for a reason. Please don't waste any more infospace with any more redundancy.

Name: Anonymous 2010-10-02 12:55

FQA my anus

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