|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
There are many people who believe that Haskell is a weird and baffling
language. Personally, I think this is untrue. Obviously, I am in the
minority here. But today, I found this:
http://www.e-pig.org/downloads/epigram-notes.pdf
WTF-O-Meter: 11.0
(Calibrated with 2001: A Space Oddessy as the 10.0 reference point.)
If you thought Haskell was far-out, this stuff is just mental. Even I
have only the vaguest comprehension of what the hell they're talking
about. This must surely be the only paper ever to refer to Haskell and
ML as "traditional languages". (Not, say, Java and C...) Truly there are
more things in Heaven and Hell than Man can know! o_O
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 23 Jul 2009 20:44:40 +0100, Orchid XP v8 wrote:
> There are many people who believe that Haskell is a weird and baffling
> language. Personally, I think this is untrue.
Heh, but you think C is a weird and baffling language, so it balances
out. ;)
Jim
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>> There are many people who believe that Haskell is a weird and baffling
>> language. Personally, I think this is untrue.
>
> Heh, but you think C is a weird and baffling language, so it balances
> out. ;)
Baffling? Yes. Weird? Not so much. Just ill thought out.
Somebody somewhere obviously thought that treating characters and arrays
as the same type was a good idea...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Orchid XP v8 <voi### [at] devnull> wrote:
> http://www.e-pig.org/downloads/epigram-notes.pdf
I think that many people who try to understand haskell feel like trying
to understand a paper like that one (even if more practical Haskell
programs are not that complicated).
Will Haskell ever become mainstream? Yes, as soon as highly theoretical
math papers become mainstream. ;)
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Orchid XP v8 wrote:
> If you thought Haskell was far-out, this stuff is just mental.
Sounds like they've reinvented typestate, but I'd have to go dig up my other
technical books from two decades ago to see if their formulae match.
--
Darren New, San Diego CA, USA (PST)
"We'd like you to back-port all the changes in 2.0
back to version 1.0."
"We've done that already. We call it 2.0."
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 23 Jul 2009 20:55:51 +0100, Orchid XP v8 wrote:
>>> There are many people who believe that Haskell is a weird and baffling
>>> language. Personally, I think this is untrue.
>>
>> Heh, but you think C is a weird and baffling language, so it balances
>> out. ;)
>
> Baffling? Yes. Weird? Not so much. Just ill thought out.
Consider when it was created. I'm sure Brian and Dennis (ie, K&R,
creators of the C programming language) would probably disagree with
you. ;-)
> Somebody somewhere obviously thought that treating characters and arrays
> as the same type was a good idea...
Personally, I think it is - data is data is data is data. A "string" is
an array of characters.
Jim
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Orchid XP v8 wrote:
> Baffling? Yes. Weird? Not so much. Just ill thought out.
It's tremendously well thought out, actually. It just doesn't do what you
want it to do. But C was much better thought out than a lot of the stuff
that came after it. After all, what did they add to it? ANSI type
declarations. Structure assignment. That's pretty much it on the significant
changes.
There were a number of languages in the 90's less well thought out, wherein
(for example) a leading 0 on a number meant it was octal *even if* you read
it from the terminal, or a \0 meant the end of the string but there weren't
any mem___() functions. Etc.
> Somebody somewhere obviously thought that treating characters and arrays
> as the same type was a good idea...
Characters and arrays aren't the same type. If you look at C and recognise
that every manipulable value fits in a machine word, the type system makes
much more sense. (Broken, of course, with structure assignment, which wasn't
in the original C version.)
Other than "I don't understand the type system" and "they could have done
better if they were writing a different language", what do you think is
poorly thought out? (I'll grant the whole idea of the need for header files
is kind of silly, but there *are* limitations you put on a language whose
compiler has to fit in 32K.)
--
Darren New, San Diego CA, USA (PST)
"We'd like you to back-port all the changes in 2.0
back to version 1.0."
"We've done that already. We call it 2.0."
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Jim Henderson wrote:
> Personally, I think it is - data is data is data is data. A "string" is
> an array of characters.
More to the point, a bit of text is quite literally a "string" of
characters :) Or where did you think the term came from?
And, since characters were represented by bytes at the time, a string
would then be an array of bytes.
--
Chambers
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp wrote:
> Will Haskell ever become mainstream? Yes, as soon as highly theoretical
> math papers become mainstream. ;)
I know you think you're being funny, but let us examine that claim for a
moment...
SQL is based on some highly theoretical mathematics: the relational
algebra. Everybody thinks they're called "relational databases" because
tables can have "relationships". However, this is false; it's because
"tables" are actually *relations*. You know what the definition of a
relation is?
"A relation is a subset of the extended Cartesian product of the
domains of its respective attributes."
Seriously. That's the definition of a relation. It's a set of tuples. A
Cartesian product. As soon as you start to dig into this stuff, you
rapidly find yourself reading about set theory, predicate logic,
functions and determinents, the relational operators of projection,
restriction and Cartesian product, the algebra of those operations
(i.e., how you can reorder them and still get the same result),
existential vs universal quantification, normalisation rules... and so
on and so forth.
Dr Constable: "Boyce Codd Normal Form states... Andrew!"
Andrew: "...every determinent is a candidate key."
Dr Constable: "...thank you Andrew. What this means[...]"
I have Database Systems by C J Date on my bookshelf. It's freakin' HUGE,
and some of the chapters contain utterly impenetrable mathematics that
even I can't begin to comprehend. (Anybody have any clue how the
relational calculus is different from the relational algebra??)
And yet... relational databases are the most popular kind of databases.
SQL is almost the *only* language for controlling databases. SQL is
basically the relational algebra with COBOL-style syntax. And yet, when
you write some statement in relational algebra, everybody's eyes glaze
over. But write some SQL, and people are much happier.
SQL is actually quite easy to understand. You just need to know about
tables and joins and normalisation and you're basically done. (Obviously
if you're going to make a professional career out of this stuff, there's
a lot more to it than you might think. But the basics are quite easy.)
Tell somebody that it's more efficient to take the disjunction of two
predicates rather than the union of two relations and they look at you
all confused. But tell them to use an OR-clause in their WHERE-condition
rather than doing a UNION query and they usually understand.
It seems to be simply a question of how you dress up the terminology.
You talk about abstract relations and domains and set-theoretic
operations and predicates and people look confused. Talk about SQL
statements and most people seem to not have a problem with it; I guess
because SQL seems far more concrete and "real-world".
All of this makes me wonder... What would happen if somebody designed a
language which was exactly like Haskell, but had syntax like Pascal or
something? What if it didn't use terms like "monad" and "functor" and
"existential quantification", but used something more concrete-sounding?
Of course, the really bizare (and wonderful!) thing about Haskell isn't
its syntax, it's the ways in which you can use it. But I wonder... If
you dressed Haskell up in sheep's clothing, how long would it take
normal programmers to realise that what you're getting them to do is
actually crazy? >:-)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Invisible wrote:
> All of this makes me wonder... What would happen if somebody designed a
> language which was exactly like Haskell, but had syntax like Pascal or
> something? What if it didn't use terms like "monad" and "functor" and
> "existential quantification", but used something more concrete-sounding?
>
> Of course, the really bizare (and wonderful!) thing about Haskell isn't
> its syntax, it's the ways in which you can use it. But I wonder... If
> you dressed Haskell up in sheep's clothing, how long would it take
> normal programmers to realise that what you're getting them to do is
> actually crazy? >:-)
Just for giggles, I'm designing this language. So far I've implemented
half the standard libraries with it. The results are... interesting. The
code becomes 85% more verbose, but I wonder if it makes any difference
to the level of comprehendability.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |