Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

not the comp.lang.functional FAQ

26 views
Skip to first unread message

Jan-Peter de Ruiter

unread,
Oct 5, 1996, 3:00:00 AM10/5/96
to

It's been three years ago, so it's time again for:

NOT THE COMP.LANG.FUNCTIONAL FREQUENTLY ASKED QUESTIONS

By Jan Peter de Ruiter

----------------------------------------------------------------
Q: What is the origin of Functional Languages (FLs)?
A: The basic idea of a FL is that instead of implementing the language,
you implement the semantics of that language. This leads
to a language with an exceptionally well defined semantics.

Q: I am writing a simple editor in C/Pascal. Someone told me that FL programs
are better, because you can prove the correctness of your program. Should
I port my program to a FL?
A: Yes, that's a very good Idea. Proving the correctness of a FL program
takes less time than running it, so don't let anyone convince you that
proving program correctness is too complex.

Q: Someone told me I can't do memory management in FL. Is that true?
A: Memory? Ever seen Bits & Bytes in the Truly Beatiful Real World of
Plato? If you want to work with memory, go back to earth and buy a
C compiler. Don't bother us with such obscene questions.

Q: But can I write an operating system in a FL?
A: Yes, you can. It's actually done twice. The fist one who did it is now
locked up in a room with padded walls, the second one is still alive &
kicking. Rumours has it that the latter built a C compiler in
a FL an *then* recompiled UNIX sources. The compiler is still working on
it, but hasn't given an error message yet, so there's still hope.

Q: Why can't I have globals in an FL. I JUST NEED THEM!
A: You are in a very serious condition. Globals are the Root of All Evil,
and it is obvious from your question that you are hooked to them. For
addicts like you, *monads* were invented, enabling people to
have globals without violating the Holy Principles of Functional
Programming.

Q: But if I use these monads, can't I simply use Pascal instead?
A: tsk, tsk, tsk!

Q: What is "lazy" evaluation?
A: Lazy evaluation is one of the most expensive evaluation strategies
information scientists have ever invented.

Q: Why is it so expensive?
A: Because a lazy evaluator spends almost all its time trying to find things
it doesn't have to do.

Q: Then why is it called lazy?
A: Because under optimal conditions (e.g. an opposition between the planets
Venus & Mercury, provided it's full moon) it has been reported that a
lazy evaluator actually found a subexpression that did not need to be
evaluated.

Q: How do you call a FL that's not Lazy?
A: Dirty.

Q: Is LISP a FL?
A: There are reliable sources reporting that useful programs have been
written in LISP. The answer therefore is: NO, LISP IS NOT AN FL.

Q: Scheme then?
A: Scheme has globals. The Fundamental Rule of Language Evaluation is:
"If a language has an impure feature, the language itself is impure." So
the fact that you can do FL-like programming in Scheme is totally
irrelevant.

Q: How many production applications have already been written in FLs?
A: 2

Q: All those FL's are very similar. Is that a coincidence?
A: No, it's not. They are basically dialects of the same language. The point
at which they differ is how they avoid the obscene code you end up with when
trying to program directly in the Lambda Calculus.

Q: Then why are FL programmers having language-wars from time to time?
A: For the same reason Protestants have more trouble with Catholics than with
Muslims.

Q: Can't FLs run faster when executed in parallel?
A: Yes, but they can't run as fast as a non-FLs excecuted in parallel.
Sorry.

Q: Can I become a FL programmer myself?
A: Yes, by meditating your ass off and showing respect for your masters,
you might reach this superior state, er.. denote this superior function
within only one lifetime.

Q: How can I prove I'm worthy of being a FL programmer?
A: By writing a hard-disk controller in Haskell. (don't worry,
it doesn't have to work for real; as long as you can prove
it *might* work)

--
----
Jan Peter de Ruiter
Max Planck Institute for Psycholinguistics
Nijmegen, the Netherlands
janp...@mpi.nl

Jean-Marc Lugrin

unread,
Oct 7, 1996, 3:00:00 AM10/7/96
to

> Q: How many production applications have already been written in FLs?
> A: 2

I know about the Haskell compiler. What's the other one? :-)

Jean-Marc Lugrin

David Rush

unread,
Oct 8, 1996, 3:00:00 AM10/8/96
to

Jan-Peter de Ruiter wrote:
>
> It's been three years ago, so it's time again for:
>
> NOT THE COMP.LANG.FUNCTIONAL FREQUENTLY ASKED QUESTIONS
>

ROTFL!

At last a language NG where they can laugh at themselves...

I knew I liked functional programming.

Was that a side-effect or a proof?
david rush
ku...@intercenter.net

0 new messages