[Freeciv-Dev] Re: curiosity
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sun, 2 Dec 2001, Raimar Falke wrote:
> On Sun, Dec 02, 2001 at 10:32:06AM +0100, Alan Schmitt wrote:
> > * 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);
> > }
>
> Just for the record: python
>
> def incr(x): return x+1
> or
> incr=lambda x: x+1
>
> Even nicer is this:
>
> add=lambda x,y: x+y
>
> add(3,4) = 7
> add("hello", "world") = "helloworld"
> add([3,4], [5,6]) = [3, 4, 5, 6]
> add(4+5j, 6+8j) = 10+13j
This is going very OT, but I can't stay away from this "Hey, my favorite
language has better or shorter syntax" :-)
perl:
sub incr ($) { $_[0]+1 }; or even shorter sub incr { $_[0]+1 };
haskell:
incr x = x + 1
But why using anything other than C? Pascal-like languages (Pascal,
Modula-2, Ada) are hard to use, because of their strict-type checking and
limited expressioning. C++ is bad designed, not to mention STL. And
building C++ programs requires much more memory and time than building C
programs. Java has almost ideal OO syntax and its peformance is not as bad
as it used to be, but Java programs are memory-eaters. Smalltalk and
Eiffel are too slow and almost dead. Perl and Python are general-purpose
languages, but users of these languages are fundamentalist and using one
of them will lose users of other language. Prolog can't be used, that's
obvious.
I say C and call other languages if necessary. And hey... Isn't it the way
Freeciv is now?
Have a nice day.
Stepan Roh
- [Freeciv-Dev] Re: curiosity, (continued)
- [Freeciv-Dev] Re: curiosity, Raimar Falke, 2001/12/01
- [Freeciv-Dev] Re: curiosity, Gregor Zeitlinger, 2001/12/01
- [Freeciv-Dev] Re: curiosity, Vasco Alexandre Da Silva Costa, 2001/12/01
- [Freeciv-Dev] Re: curiosity, Raimar Falke, 2001/12/02
- [Freeciv-Dev] Re: reqs and languages (was curiosity)., Andrew Sutton, 2001/12/02
- [Freeciv-Dev] Re: reqs and languages (was curiosity)., Reinier Post, 2001/12/02
- [Freeciv-Dev] Re: reqs and languages (was curiosity)., Raimar Falke, 2001/12/02
- [Freeciv-Dev] Re: reqs and languages (was curiosity)., Andrew Sutton, 2001/12/02
- [Freeciv-Dev] Re: curiosity, Alan Schmitt, 2001/12/02
- [Freeciv-Dev] Re: curiosity, Raimar Falke, 2001/12/02
- [Freeciv-Dev] Re: curiosity,
Stepan Roh <=
- [Freeciv-Dev] Re: curiosity, Gregor Zeitlinger, 2001/12/02
- [Freeciv-Dev] Re: curiosity, Gregor Zeitlinger, 2001/12/02
- [Freeciv-Dev] [OT] Ocaml (was Re: Re: curiosity), Alan Schmitt, 2001/12/02
[Freeciv-Dev] Re: curiosity, Raimar Falke, 2001/12/01
- [Freeciv-Dev] Re: curiosity, Andrew Sutton, 2001/12/01
- [Freeciv-Dev] Re: curiosity, Petr Baudis, 2001/12/02
- [Freeciv-Dev] Re: curiosity, Raimar Falke, 2001/12/02
- [Freeciv-Dev] Re: curiosity, Andrew Sutton, 2001/12/02
- [Freeciv-Dev] Re: curiosity, Raimar Falke, 2001/12/02
- [Freeciv-Dev] Re: curiosity, Andrew Sutton, 2001/12/02
|
|