Dialect, A Python derived environment (and language ?)

Tim Peters tim_one at email.msn.com
Fri Sep 24 01:43:27 EDT 1999


I'm so hopelessly backed up with email, I figured screw it, learn another
language <wink>.

[Ionel Simionescu, about http://www.aristar.com/DeveloperTools.html]
> It seems that Python got a child.

I don't see much of Python in this -- I believe their claim that it was
inspired mostly by some flavor of Basic.  They probably saw some Python at
some time, though, and the language is clearly better for it <0.9 wink>.

> (Nice feature: makes an exe right away.)

Very easily, too!  Just click "make an .exe" in the IDE, and it makes one.
Just what I've been waiting for:  instead of a burdensome 20-byte
cross-platform

print "Hello world"

file, you can get the same effect now with a self-contained 685Kb
Windows-only .exe:

E:\dialect>wc hi.exe
    984   16207  700478 hi.exe

This should be a real help to those who have trouble remembering where they
put tiny files.

[Martijn Faassen]
> ...
> It's too close to Python in syntax for this to be an independent
> development..

What's so Pythonic about it?  They use double-underscore names for some
system vrbls, but then C also reserves names of that form (where do you
think Guido got the idea <wink>?).  The specific names "__init__" and
"__del__" are probably not coincidence, but they appear to be the only
overlap.  The only other overt Pythonism I saw was using "and" and "or"
instead of "&&" and "||".  Python may not have been the first language to
use "if", "class" and "break" ...

[Stephan Houben]
> It's clear that some people have a different idea of what "cross-platform"
> constitutes than Guido...
>
> Apparently, three different versions of Windows is cross-platform.

If you are (as their market is) targeting Windows CE devices, the ability to
develop code under Win9x/NT is vital.  In context, it was an appropriate
claim -- their market doesn't care about anything else.

> Anyway, the documentation they make available is in some .doc format,
> and it doesn't look very appetizing when run through "strings",

It's MS Word format; their audience wants that; the same docs are available
from the download in MS HTML Help format, for those seeking an even less
transportable format <wink>.

> But I managed to get some code from it anyhow, for your amusement:
>
> Class base
>     refCount = 0     // Shared data
>     __init__ = func()
>         refCount = refCount + 1
>         message("Base class constructor")
>     endfunc
>     __del__ = func()
>         refCount = refCount - 1
>         message("Base class destructor")
>     endfunc
> EndClass
> ...
> It looks indeed as some heavily bastardized Python.

Or lightly sanitized Basic <0.5 wink>.

> Note the inconsistency in keyword capitalization!
> Class <-> EndClass versus func <-> endfunc

It's case-insensitive; you can write "class" and "FUnC" if you want.

> Also the "<name> = func()" notation is pretty ugly (sic),
> if you want my humle (hah!) opinion.

Mine too.

[and other people bash it for looking vaguely like Python]

I'm afraid Python's lawyers are far too busy suing Perl for borrowing
Python's object model to hassle these poor folks for borrowing three pieces
of Python syntax and ignoring all its semantics <ahem>.  It may be more
interesting to study the manual for choices they made Python *didn't*.

For example, their version of "import" has two features Python's doesn't:

1) An optional "as <identifier>" clause, for simultaneous import and
renaming:

    import "someLongModuleName" as short

This is frequently suggested for Python (came up again just this week!);
here's a chance to play with something like that.

2) Optional arguments to pass *to* the module:

    import "someModule", true, 12

The target module receives the arguments in its __args__ attribute.  Is that
useful?  Even if the module (as in Python) is "executed" at most once?

Take Dialect on its own terms, and it's a very interesting design point:
the language and its libraries are both much smaller than Python, but with a
little bit of GUI and a little bit of sockets and little bits of other
things built in.  I find a lot to like in it, and rather than gripe about
its overlap with Python, I'll be looking for the best ideas to steal.

don't-get-mad-get-even-ly y'rs  - tim






More information about the Python-list mailing list