Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2000:
[Freeciv-Dev] Re: Plans for 1.12
Home

[Freeciv-Dev] Re: Plans for 1.12

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: Freeciv Dev <freeciv-dev@xxxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Plans for 1.12
From: Steve Hodge <shodge@xxxxxxxxxxxxxx>
Date: Tue, 27 Jun 2000 13:52:32 +1000

Artur Biesiadowski wrote:
> Tomasz Wegrzanowski wrote:
> > And ugly/beauty issue is very personal.
> 
> I agree, but most perl programs would win Obsfucate-C contest without
> modification :)
> Seriously, I'm mainly talking about proliferation of $ @ % etc in perl
> code.

That's really a very naive opinion (I don't mean any offense by that, so
please don't take any). The $/@/% make code more readable because it
immediately tells you what type of variable you're dealing with. Most
other languages don't. For example, with C if you see a variable named
foo it could be anything - integer, pointer to a char, pointer to a
pointer, whatever. In Perl @foo is one thing - an array. There are traps
- in particular I disagree with each type (scalar, array, hash, etc)
having seperate namespaces, but most languages have some. The things I
find obfucate Perl are the regular expression handling, the special
variables (with the stupid symbols for names like $[ - although these
are optional), and being able to call functions without brackets (which
I guess derives from Perl's shell script roots). All of these things
problems are eliminated by good coding style, and of course any language
can be made to look bad by poor coding style.

> Also fact that function can have different side effect depending
> on fact what type of return I want from it at call site is very 'ugly'
> for me.

Agree with that. But that is one of the most requested features in OO
languages (at least by people who don't understand) - overloading by
return type.

Regards,
Steve Hodge



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