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

An EXPERT PROGRAMMER explains OO

Name: Anonymous 2008-03-19 11:50

Because I know you were all having so much trouble with this difficult concept.

http://theunixgeek.blogspot.com/2007/11/understanding-object-oriented.html

Name: Anonymous 2008-03-19 11:55

Everyone can explain OO, try to explain nomads.

Name: Anonymous 2008-03-19 12:00

HASKELL. HASKELL NOMADS.

Name: Anonymous 2008-03-19 12:20

Well, to put it quite simply, SCHEME.

Name: Anonymous 2008-03-19 12:25

The forced usage of
Nomads to do I/O
Thread over

Name: Anonymous 2008-03-19 12:53

He fails just like almost every other OOP explanation out there. The proper way is to, once your audience knows C, explain how OOP can make programming more simple and efficient by replacing structs and pointers to functions with objects containing methods and data. That is better than pointless hand-waving about how OOP can model real-world objects.

tl;dr:

- you have one or more structures containing data
- you have one or more functions that, taking a pointer to said structures, does something with the data
- the structure definitions are the classes
- allocated structures are objects
- the functions are methods of the class

...and that is OOP.

Name: Anonymous 2008-03-19 13:31

Why the fuck do you need to explain it? -- OOP is useless!

Name: Anonymous 2008-03-19 13:32

I don't understand why people say that you can\'t do OOP with C

Name: Anonymous 2008-03-19 13:35

>>6
No, that's procedural programming.

Name: Anonymous 2008-03-19 14:27

>>9
Actually, that's the transition from procedural to OOP.

Name: Anonymous 2008-03-19 14:31

terrible, yes.
also anyone who doesn't intuitively understand the encapsulation of state and function in creating an Abstract Data Type should stop using computers immediately.
also
(examples given in Objective-C)
what

Name: Anonymous 2008-03-19 14:37

>>8
You can't, because if you're using C you should know better.

Name: Anonymous 2008-03-20 15:11

>>8
They say that because they're too weak to bother with all the manual hacks you need to keep up-to-date all around your code in order to do proper inheritance and polymorphism in C.

Name: Anonymous 2008-03-20 15:16

>>9
Actually, that's non-pure OO languages like Sepples.

Name: Anonymous 2008-03-21 0:40

Oh, fuck all of that enterprise faggotry. I'm so goddamn EXPERT I don't even document half the code I write, and its ALL in C. Fuck enterprise, fuck OOP, fuck even the ABSTRACT BULLSHITE, I'm an [sup][u]EXPERT[/sup]C programmer and I'm damn proud of it.

Name: Anonymous 2008-03-21 0:46

This tutorial is so sad. I could explain OOP better in fewer words with half my brain tied behind my back.

Name: Anonymous 2008-03-21 0:50


HASKELL. HASKELL NOMADS.

Name: Anonymous 2008-03-21 1:00

>>6
No you dope, OOP is two things: a way to make "I don't care" a good answer to the question "How does this work?", and a method to enable more extreme late binding in your programs. By describing OOP from the bottom up, you've managed to completely miss the point, and mislead who knows how many noobs.

tl;dr

- In OOP you construct programs by asking objects to perform tasks for you, and you don't need to worry about how it happens.
- Objects are so modular that they can be substituted for one another at any time, letting you more easily write programs whose behavior is decided at run-time when your program has the information it needs to decide that behavior.

...and that is OOP.

Name: Anonymous 2008-03-21 4:24

>>15
So you'll be an Austrian nobleman?

Name: Anonymous 2008-03-21 4:46

>>19
This may surprise you, but I invented that meme.

Name: Anonymous 2008-03-21 4:50

>>20
This might surprise you, but you missed the reference.

Name: Anonymous 2008-03-21 5:28

>>21
This may surprise you, but Cake is a shitty band.

Name: Anonymous 2008-03-21 5:44

>>18
- In Lambda Calculus you construct programs by asking functions to perform tasks for you, and you don't need to worry about how it happens.
- Functions are so modular that they can be substituted for one another at any time, letting you more easily write programs whose behavior is decided at run-time when your program has the information it needs to decide that behavior.

...and that is Sparta.

Name: Anonymous 2008-03-21 5:45

>>22
This might surprise you, but why should I care about your opinion?

Name: Anonymous 2008-03-21 11:57

>>23
- In Lambda Calculus you construct programs by asking functions to perform tasks for you, and you don't need to worry about how it happens.
Same as in QBasic programming.

Name: Anonymous 2008-03-21 12:38

>>25
But then again, QBasic is pretty awesome.
In fact, I can think of only one thing that would be more awesome.
Gentlemen! I present to you... λBasic.NET

Name: Anonymous 2008-03-21 13:16

>>23
Yes, they are equivalent.

Name: Anonymous 2008-03-21 13:33

λBasic.NET++, 2008 Edition

Name: Gerald Sussman 2008-03-21 13:54

Help me solve this problem I found in an old beta version of my SICP.

Implement the car primitive using only the cdr primitive.

Name: Anonymous 2008-03-21 14:58

(def (car 'x y) (cdr (cons 'y x)))

Name: Anonymous 2008-03-21 16:51

>>30
Uhm, quote failure.

Name: Anonymous 2008-03-21 17:03

Prelude> mapM (putStrLn . show) [1..4]
1
2
3
4
[(),(),(),()]

Uhm, where did that list of empty tuples come from?

Name: Anonymous 2008-03-21 17:06

>>32
putStrLn :: String -> IO ()

Name: Anonymous 2008-03-21 17:09

>>33
So I map it along a list of one-element lists and one empty list. That's not a reason to show the last nil as empty tuples.

Name: Anonymous 2008-03-21 18:05

>>32
Nomads.  Haskell nomads.

Name: Anonymous 2008-03-21 18:07

>>34
?
The 1, 2, 3, 4 are printed as a result of calling putStrLn on each element. The [(),(),(),()] is the resulting list from your mapM call.

Name: Anonymous 2008-03-21 18:16

>>36
The [(),(),(),()] is the resulting list from your mapM call.
Huh?

The show part actually transforms the list to a list of strings and a nil at the end, right? Why would it return [(),(),(),()] ?

Name: Anonymous 2008-03-21 18:20

>>37
                  /      \
               {       ヽ
         ____   ハ     }
         ̄`>: : : : : ∨: : ー‐ --yz 、
         /: : : : : : : :/: : : : : : : : : : 、: :\
       /:_: : : : :/: : /: |: : : : : : : : : : :\: : ヽ
      / /// : :/: : :/:/:!: : :.:.|、: : : : : : : \: :.',
.      {/ // : :/: : :/_/:小:. :.:.|_ヽ__: : : : ヽ: l
        l/l : : !: : 7゙/ノ l| V:.|  \: : : :、 : : l: |
         |: :/|: :/:/  j|  ヽ|   \: : \: :!: \_
         |/ |;/l/x≡≡   |≡≡z.ハ: :.ヽl\: : : :\
        r┬z/:.:|           ∠─-ヘトr-く ̄ヽ :\
       r「「l {: : :\    ‐    ////「 { \ヽ:.:\ \ :\
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓

Name: Anonymous 2008-03-21 19:02

>>37
Haskell. Haskell Nomads.

Name: Anonymous 2008-03-21 19:26

>>38
Konachan kawaii

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