Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: curiosity
Home

[Freeciv-Dev] Re: curiosity

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: curiosity
From: Alan Schmitt <alan.schmitt@xxxxxxxx>
Date: Sun, 2 Dec 2001 10:32:06 +0100

* Vasco Alexandre Da Silva Costa (vasc@xxxxxxxxxxxxxx) wrote:
> basic:                no functions or procedures, game over. GOSUB? no thanks.
> logo:         need i say anything? good for teaching programming and nothing
>               else.
> pascal:               too strict, you end up typing way too much. for loops 
> are much
>               less flexible. i find it too contraining and limited.

But local function declaration, which can be useful.

> modula-2:     nicer than pascal, but still has most of its problems.
> c:            fast, flexible, easy to shoot your foot with, really hard
>               to debug, has virtually universal support.
> x86 asm:      not portable.
> smalltalk:    its dead what can i say?
> c++:          nearly as fast as c, flexible, horribly complex syntax,
>               unreadable code, mixes implementation with interfaces, you
>               can easily interface to c, STL sucks, needs a bigger API,
>               inheritance and templates are nice, as hard to debug as c.
> lisp:         several built-in data types, flexible, code is more
>               unreadable because of prefixed notation, code is more
>               elegant because of prefixed notation, slow, crap compilers,
>               crap garbage collection, lousy interface to c, has OO
>               support.
> prolog:               i doubt this can be a general purpose language.
> caml:         obfuscated function declaration syntax.

Although I agree Ocaml syntax is not perfect, how about comparing the
identity function:

let id x = x

and

void* id(void* x){
  return x;
}

OK, I cheated, I used polymorphism and type reconstruction to make C
look bad. How about the incr function:

let incr x = x + 1

and

int incr(int x){
  return (x+1);
}

What I really like about Ocaml:
- type reconstruction
- polymorphism
- automatic memory management
- pattern matching (imagine a 'switch' on steroids)
- rapid development (because there is a toplevel available, and because
  of type reconstruction)
- first class functions
- symbolic replay debugger that can go back in the program execution

Well, I'll stop here, you can look at
http://caml.inria.fr/FAQ/general-eng.html for more ;-)

Alan

--
The hacker: someone who figured things out and made something cool happen.


[Prev in Thread] Current Thread [Next in Thread]