Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Moderation

Author: David Rasmussen

Date: 14:13:33 01/16/03

Go up one level in this thread


On January 16, 2003 at 16:19:51, Sune Fischer wrote:

>
>Could be, I still think a factor 2-4 is huge, certainly it's too much when speed
>is of the essence, as in chess.
>

I think it's a "huge" slowdown too, but it is worstcase, not average case.

>IIRC there was also something about no one would write 10000 lines of code in a
>functional language. I agree with Vincent there too, I can't imagine anyone
>trying to write an OS is Lisp, for instance :)
>

That comment was simply idiotic, if you ask me. The one strength of functional
languages (and languages more abstract than, say, C, in general) is that
maintainability is much better and so is scalability. C is one of the worst
languages for writing large projects. The larger the project gets, the more
unsuited C becomes. C++ has the same problem although it scales an order of
magnitude better at least.

In all the many many many huge projects that exists that uses a functional
language, there was a reason they chose that language, and not a lower level
language. For the vast amount of projects, speed is not so paramount that you
wouldn't trade a factor 2-4 for a 10-100 speedup in development and maintanence
and testing times. Functional languages _are_ used for huge projects. Not for
OS'es (yet), in general not for systems programming, but for all sorts of other
stuff.

>>
>>What do you mean?
>
>Without a definition how do you sort the languages into functional and
>non-functional subsets?
>

The boundary is of course vague.

>I lack a clear definition of "functional".
>Is C functional? I guess no (or else the discussion wouldn't make much sense).
>Is that the abstraction level is higher in some way, in what way?
>

You can write in a functional style in C. Just as you can write in an object
oriented style in assembler or C. But these languages lack many features to
actually _support_ such styles. So I wouldn't call them functional or object
oriented for that matter.

Functional languages typically
- have functions with full citizenship, higher order functions etc.
- supports and encourages referential transparency
- have a different type system than, say, C, combinations of dynamically and
implicit typing. Most often it is some form of Hindley-Milner type system.

and a lot of other things.
You can't name many languages where I would be in doubt whether to call the
language functional or not.

/David



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.