Unknown
2015-01-26 18:20:22 UTC
The reason why < search?q=%22John+Hughes%22+%22pretty+print%22+program >
is so good is that it's presented top-down/goal-directed:
starting with our goal of achieving maximum results from minimum
long-term effort, by re-use instead of repeating work.
Unfortunately [for me] it's explained via Haskell examples.
OTOH John Hughes's paper intro is so good, that is says I MUST know
Haskell.
My explanation of why Haskell is so ad-hoc, like the english-language,
compared to eg. Oberon or lisp, is the British psyche. Although I fully
agree
with their common-law [vs. every thing codified], and Adam Smith vs Marx;
computer languages which you need to get-used-to/imbibe are bad.
The complete syntax of Oberon is about 50 lines like:----
ident = letter {letter | digit}.
...
number = integer | real.
hexDigit = digit | "A" | "B" | "C" | "D" | "E" | "F".
...
Qualident = [ident "."] ident.
...
Expression = SimpleExpression [Relation SimpleExpression].
...
Relation = "=" | "#" | "<" | "<=" | ">" | ">=" | IN | IS.
...
Statement =
[ Assignment | ProcedureCall | IfStatement |
CaseStatement | Wh
ileStatement | RepeatStatement |
ForStatement | LoopStatement | WithStatement | EXIT |
RETURN [E
xpression] ].
...
WhileStatement = WHILE Expression DO StatementSequence END.
...
FormalParameters = "(" [FPSection {";" FPSection}] ")" [":"
Qualident].
FPSection = [VAR] ident {"," ident} ":" Type.
...
Module = MODULE ident ";" [ImportList] DeclarationSequence
[BEGIN StatementSequence] END ident ".".
---------------------------------------------------
Where's the syntax of Haskell?
Or must you imbibe it like an infant learns it's first language, or like
your dog learns to catch-a-ball. That's not science; it's ball-games!
is so good is that it's presented top-down/goal-directed:
starting with our goal of achieving maximum results from minimum
long-term effort, by re-use instead of repeating work.
Unfortunately [for me] it's explained via Haskell examples.
OTOH John Hughes's paper intro is so good, that is says I MUST know
Haskell.
My explanation of why Haskell is so ad-hoc, like the english-language,
compared to eg. Oberon or lisp, is the British psyche. Although I fully
agree
with their common-law [vs. every thing codified], and Adam Smith vs Marx;
computer languages which you need to get-used-to/imbibe are bad.
The complete syntax of Oberon is about 50 lines like:----
ident = letter {letter | digit}.
...
number = integer | real.
hexDigit = digit | "A" | "B" | "C" | "D" | "E" | "F".
...
Qualident = [ident "."] ident.
...
Expression = SimpleExpression [Relation SimpleExpression].
...
Relation = "=" | "#" | "<" | "<=" | ">" | ">=" | IN | IS.
...
Statement =
[ Assignment | ProcedureCall | IfStatement |
CaseStatement | Wh
ileStatement | RepeatStatement |
ForStatement | LoopStatement | WithStatement | EXIT |
RETURN [E
xpression] ].
...
WhileStatement = WHILE Expression DO StatementSequence END.
...
FormalParameters = "(" [FPSection {";" FPSection}] ")" [":"
Qualident].
FPSection = [VAR] ident {"," ident} ":" Type.
...
Module = MODULE ident ";" [ImportList] DeclarationSequence
[BEGIN StatementSequence] END ident ".".
---------------------------------------------------
Where's the syntax of Haskell?
Or must you imbibe it like an infant learns it's first language, or like
your dog learns to catch-a-ball. That's not science; it's ball-games!