A Mountain of Perl Books + Python Advocacy

tony summerfelt tsummerfelt1 at myspleenhome.com
Mon May 8 10:18:57 EDT 2000


On Tue, 4 Apr 2000 22:39:20 -0700 (PDT), lewst wrote:
>       ^^^^^^^^^^

just started reading this ng.

> I personally find Perl an abomination and

this could be what attracted perl people to the language to start with :)

> At this point I wondered if my brain was just different than all those
> Perl junkies out there.  

i got the idea from someone about 4 years ago...to learn a language each
summer.

they mentioned perl, and this was the first one i decided to learn. i liked
it immediately because of it's power and quirkiness. i was coming from the C
world in general and the quickbasic (dos) specifically. it was writing lines
of code to get things done instead of pages.

i grokked it right away <ducking, and running>. i've never gotten caught by
any of the `gotcha's' but i've looked at a lot of code and read a lot of
documentation. unfortunately you have to read EVERYTHING every printed if
you want to ask a question in c.l.p.m. i stopped reading that ng after a week.

then i discovered tk. this was great, i could now write gui apps in windows
and X. and with the appropriate modules i could write text mode interfaces
for both platforms...

i was finding tk to be a lot of typing, so i tried java (mainly to do more
oo type of programming, and java having gui functionality). too much
friggin' typing. and the java code really wasn't `portable' (otoh, i have
perl programs that run unchanged between windows, linux, dos, and beos)

decided it was time to try tcl/tk and see what all the fuss was about over
their. i was able to get a gui app up an running in about 2 minutes. it was
a jaw dropper for sure. so much so that i decided to port my palmpilot game
(website below) from C to tcl/tk. pretty much a ten minute job...i'm
thinking of porting it again now to itcl, or python.




about a year ago, i tried python...first time i read about the whitespace
thing. i dropped it. i didn't really get to write anything. i read various
docs for about five minutes before i discovered that....

now, i'm getting the `new language bug' thing again, and python really was
next on my list. i have some questions below. i can live with the whitespace
thing as i'm always lining up my code anyway. at this point it's a
non-issue. i spend seventy-five percent of my day typing and i hate typing
(you can tell by the lack of caps :/ i know that the amount of python typing
i'm going to have to do bothers me...


> Perl is very publicized and well-known while
> the better language is sitting here a dark corner unnoticed.  

i thought the same thing about tcl/tk. i don't consider it `better' just
different.

at this point i do all my command line utils in perl, all my gui programs in
tcl/tk...

i was using it for larger projects. but i'm interested in doing larger
things more oo'd

i think something like the following is pretty hard to beat:

#!/usr/bin/perl

open(in,$ARGV[0]) || die("can't open $ARGV[0]");
open(out,">$ARGV[1]) || die("can't open $ARGV[1]);

while (<in>)
{
  unless($i,{$_}++) {push(@uniq,$_);}
}
print out (sort(@uniq));


which is basically a 5 line simple uniq program. i can already hear the
`that's unreadble'. and yeah, it is...to the non perl program. i think lisp
is unreadable, but i don't program in lisp so i think that's a given.


and i think the following is hard to beat in tcl/tk:

#!/usr/bin/wish

button .b -text "Exit" -command {exit}
pack .b


to fire up a window with a button on it.


how does python compare for those two programs?


how does ptyhon compare to itcl? i won't even compare perl's oo, cause i
think it's more of a bolt on anyway. or compare java either, which i don't
think is all that portable...unless that's changed in the last few years.


my other concern is cross-platform. my standard (ie non os dependent) python 
stuff has to run under linux, windows, dos, and beos.


think i'll actually pick up the `24 hour python book'...i'm pretty sure i'll
grok it in less though...


-- 
*----------------------------------------
| 
|http://members.home.net/tsummerfelt1
|
|remove myspleen to email
|
*-----------------------



More information about the Python-list mailing list