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

Pages: 1-

Learning Imperative Programming

Name: Anonymous 2008-10-11 10:40

Heya /prog/,

For years I've programmed in an object-oriented fashion with C++, but I'm becoming more and more interested in using straight up C instead. After all this time using C++, I'm not quite sure how to approach a complex problem without using objects. Is there any kind of resource you can point me to that will help me learn the best way to structure my C code?

Name: Anonymous 2008-10-11 10:45

Read SICP

Name: Anonymous 2008-10-11 11:49

Interfaces work on opaque data types with suffix _t.
That data type is a typedef identifier to something (most likely a struct)
You design all your functions as
ret name(foo_t *, rest);

To operate on that opaque data type.

Name: Anonymous 2008-10-11 11:56

He said without using objects.

Name: Anonymous 2008-10-11 13:13

Read "A Discipline of Programming" by Dijkstra. It's good for imperative.

Name: Anonymous 2008-10-11 13:51

ITT faggots confusing "imperative" with "procedural". OO is imperative too, you morons.

Name: Anonymous 2008-10-11 13:58

OO is imperative too, you morons.
Except when it's not.

Name: Anonymous 2008-10-11 14:00

>>7
Would you mind pointing out one example when it's not?

Name: Anonymous 2008-10-11 14:08

>>8
CLOS

Name: Anonymous 2008-10-11 14:27

>>9
Wrong, faggot.

Name: Anonymous 2008-10-11 15:31

>>9
CLISP is so imperative that Pascal programmers spit at it.

Name: Anonymous 2008-10-11 18:27

>>11
CLISP
Wat.

>>7
It's always imperative.

Name: Anonymous 2008-10-11 23:39

>>9
What the fuck are you talking about? How is CLOS not imperative?

Name: Anonymous 2008-10-12 0:25

>>12
What about functional object-oriented programming? Wouldn't that be what O'Haskell falls under?

Name: Anonymous 2008-10-12 0:34

>>14
FOOP

Name: Anonymous 2008-10-12 1:37

>>15
No thanks, I'll stick to normal procedural object-oriented programming.

Name: Anonymous 2008-10-12 10:12

>>16
POOP?

Name: Anonymous 2008-10-12 11:42

Does anyone know of any language that has tried to implement some kind of FOOP?

Name: Anonymous 2008-10-12 13:01

Name: Anonymous 2008-10-12 13:02

ULTIMATE HASKELL DATA TYPE:

* <- (* <- * -> *) -> *

Name: Anonymous 2008-10-12 17:10

>>20
Looks like the kirby-dance operators.
(>^.^)> <(^.^)> <(^.^<)

Name: Anonymous 2008-10-12 22:34

>>14
Haskell monads are a way of doing imperative on top of functional.

Name: Anonymous 2008-10-13 18:38

>>22
My god, that is the least bullshit, most comprehensible explanation of monads I've ever read.

This shit actually makes *sense* now.

I wish I hadn't wasted 30 hours going through dumb fucking mathematical wankfests about monadic theory and shit first.

Name: Anonymous 2008-10-13 19:08

>>23
It's also a very incomplete explanation. Yes, you can do imperative-ish IO with monads, but that's only a small fraction of the whole truth.

Name: Anonymous 2008-10-13 19:17

>>23
Maths is the clearest way to describe Monads. Go back to primary school you dullard.

Name: Anonymous 2008-10-13 21:44

>>25
Eat a cock, fag

Name: Anonymous 2008-10-14 11:35

>>26
I'm not your fag, buddy.

Name: Anonymous 2008-10-14 17:29

>>26
I'm not your buddy, fag.

Name: Anonymous 2008-10-18 2:01

>>28
>>27
I'm not your nigger, nigger.

Name: Anonymous 2011-01-31 20:07

<-- check em dubz

Name: Anonymous 2011-02-04 16:26

Name: Anonymous 2011-02-04 18:55

<

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