Learning Imperative Programming
1
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?
2
Name:
Anonymous
2008-10-11 10:45
Read SICP
3
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.
4
Name:
Anonymous
2008-10-11 11:56
He said without using objects.
5
Name:
Anonymous
2008-10-11 13:13
Read "A Discipline of Programming" by Dijkstra. It's good for imperative.
6
Name:
Anonymous
2008-10-11 13:51
ITT faggots confusing "imperative" with "procedural". OO is imperative too, you morons.
7
Name:
Anonymous
2008-10-11 13:58
OO is imperative too, you morons.
Except when it's not.
8
Name:
Anonymous
2008-10-11 14:00
>>7
Would you mind pointing out one example when it's not?
9
Name:
Anonymous
2008-10-11 14:08
10
Name:
Anonymous
2008-10-11 14:27
11
Name:
Anonymous
2008-10-11 15:31
>>9
CLISP is so imperative that Pascal programmers spit at it.
12
Name:
Anonymous
2008-10-11 18:27
>>11
CLISP
Wat.
>>7
It's always imperative.
13
Name:
Anonymous
2008-10-11 23:39
>>9
What the fuck are you talking about? How is CLOS not imperative?
14
Name:
Anonymous
2008-10-12 0:25
>>12
What about functional object-oriented programming? Wouldn't that be what O'Haskell falls under?
15
Name:
Anonymous
2008-10-12 0:34
16
Name:
Anonymous
2008-10-12 1:37
>>15
No thanks, I'll stick to normal procedural object-oriented programming.
17
Name:
Anonymous
2008-10-12 10:12
18
Name:
Anonymous
2008-10-12 11:42
Does anyone know of any language that has tried to implement some kind of FOOP?
19
Name:
Anonymous
2008-10-12 13:01
20
Name:
Anonymous
2008-10-12 13:02
ULTIMATE HASKELL DATA TYPE:
* <- (* <- * -> *) -> *
21
Name:
Anonymous
2008-10-12 17:10
>>20
Looks like the kirby-dance operators.
(>^.^)> <(^.^)> <(^.^<)
22
Name:
Anonymous
2008-10-12 22:34
>>14
Haskell monads are a way of doing imperative on top of functional.
23
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.
24
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.
25
Name:
Anonymous
2008-10-13 19:17
>>23
Maths is the clearest way to describe Monads. Go back to primary school you dullard.
26
Name:
Anonymous
2008-10-13 21:44
27
Name:
Anonymous
2008-10-14 11:35
>>26
I'm not your fag, buddy.
28
Name:
Anonymous
2008-10-14 17:29
>>26
I'm not your buddy, fag.
29
Name:
Anonymous
2008-10-18 2:01
>>28
>>27
I'm not your nigger, nigger.
33
Name:
Anonymous
2011-01-31 20:07
<-- check em dubz
34
Name:
Anonymous
2011-02-04 16:26