Mailing List Archive

Dylan vrs Python (was; Re: Python IS slow ! [was] Re: Python too slow for real world)
On 28 Apr 1999 19:34:24 -0500, neelk@brick.cswv.com (Neel Krishnaswami) wrote:

> In article <372769B0.3CE8C0F3@prescod.net>,
> Paul Prescod <paul@prescod.net> wrote:
> >William Tanksley wrote:
> >>
> >> And Oberon (SlimBinaries), and Eiffel (typing and general compile-time
> >> error catching), and ...
> >
> >Actually, isn't Eiffel's type system famous for being full of holes?
> >
> >Regardless, wouldn't a better source of inspiration on typing be a
> >language with *optional* compile-time error checking?
>
> I've been playing around with Dylan recently, and it seems like what
> Python would be if you added "end" blocks and mated it with CLOS. Since
> Dylan is nearly as dynamic as Python, I think it might be a good source
> of inspiration for Python 2. (And it might even be the case that the
> Dylan-to-C compiler might be a source of good bits to improve Python's
> speed. I haven't looked at the source yet, though.)

Conversely, I was just looking at Python recently (as related work for a
paper).

The Python community might like to take a look at Dylan:

http://www.gwydiondylan.org

http://www.harlequin.com/products/ads/dylan/

As a taster, here is the "invert" example in Python and Dylan:

# Python
def invert(table):
index = {} # empty dictionary
for key in table.keys():
value = table[key]
if not index.has_key(value):
index[value] = [] # empty list
index[value].append(key)
return index

// Dylan
define function invert (table)
let index = make(<table>);
for (value keyed-by key in table)
index[value] := add!(element(index, value, default: #()), key);
end;
index
end;

The "keyed-by" clause in the "for" statement is a slight cheat since it is a
Harlequin extension (otherwise the Dylan code would be even more similar to
the Python code).

with-heavy-troll ()
What would you give for interactive development and native compilation and
incremental gc and objects-all-the-way-down and extensible syntax and COM and
CORBA and a great GUI toolkit?
end;

:-j

__Jason
Dylan vrs Python (was; Re: Python IS slow ! [was] Re: Python too slow for real world) [ In reply to ]
Jason Trenouth (jason@harlequin.com) wrote:
[...]
> with-heavy-troll ()
> What would you give for interactive development and native compilation and
> incremental gc and objects-all-the-way-down and extensible syntax and COM and
> CORBA and a great GUI toolkit?
> end;

A lot--now if I could only get Harlequin Dylan to (1) use a readable
font and (2) run on my Linux machine. So I have to settle for Gwydion
Dylan right now, which is nice, but not nearly as nice as what you
described above. :)

(I would still second Jason's comment and suggest that people have a
look at the free version of Harlequin Dylan--if I had to develop code
under Windows, it would probably be my IDE of choice, with a couple of
reservations.)

Reimer Behrends