Discussion:
Haskell's regretable ad-hockery.
(too old to reply)
Unknown
2015-01-26 18:20:22 UTC
Permalink
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!
n***@gmail.com
2015-01-31 03:42:07 UTC
Permalink
Post by Unknown
The reason why < search?q=%22John+Hughes%22+%22pretty+print%22+program >
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. ...
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.
--snip--
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!
======
OK thanks, I found the formal syntax listing. It's a monster.
And IMO this is how it came to be so bloated.

] List comprehensions can often be used instead of map, filter and
] concat to produce "nicer" results:

Ie. the designers are arty poets, playing with THEIR language, instead
of scientists designing a tool for humanity.

<xhalee> who is one of the few, not afraid to write that <english
should not be the sole depository for human knowledge> gives a very
good crit on Haskell's chosen syntax for List comprehension.
===
Science/knowledge is the reduction of a mass of apparently random facts
into a minimal set of theories.

In one of the Haskell tutorials, you can "feel" how chuffed the author is,
as he almost directly translates code-section into his-english.

Loading...