Method Underscores? (and a 'solution')
Alex Martelli
aleaxit at yahoo.com
Fri Oct 22 02:56:29 EDT 2004
Jeremy Bowers <jerf at jerf.org> wrote:
> On Fri, 22 Oct 2004 00:25:28 +0200, Alex Martelli wrote:
>
> > Jeremy Bowers <jerf at jerf.org> wrote:
> >
> >> But what mystical language exists that uses less punctuation than Python?
> >
> > Applescript, maybe. 'tell foo of bar to tweak zippo' where python would
> > have bar.foo.tweak(zippo), looks like. (I'm not enthusiastic about the
> > idea, just pointing it out!-).
>
> Point. Maybe Cobol on the same theory? I don't know, I've never used
> either.
Roughly, I guess. But a typical Applescript might be:
tell application "Microsoft Word"
open "MyWordFile"
set selection to paragraph 1
data size of selection as string
end tell
while a typical Cobol would start
IDENTIFICATION DIVISION.
PROGRAM-ID. My-Program.
AUTHOR. Some Body.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 Num1 PIC 9 VALUE ZEROS.
etc, etc; more full-stops, typically.
> I guess if you're so stuck on the double-underscore-is-too-much-
> punctuation idea, you *deserve* to try to do all your programming in a
> combo of COBOL and Applescript :-)
>
> I'm thinking I'll stick with Python.
Me, too. But I understand how the "antiperl" (lrep?-) nearly
punctuation free style of Applescript may be tempting -- if Applescript
were cross-platform, it might perhaps make an even better beginners'
language than Python (and I think that of few languages). It doesn't
scale up as well as Python, though, it appears to me.
Alex
More information about the Python-list
mailing list