[Prev][Next][Index][Thread]
Re: Results: finished teaching one Dylan course
On Thu, 8 Jun 2000, Wolfgang Grafen wrote:
> dauclair@hotmail.com wrote:
> > "A New Approach to Object Oriented Programming" course ... See
> > http://www.geocities.com/oop_guru for this and other programming
> > courses I offer.
> >
>
> Hi,
>
> I saw your table about programming languages at
> http://www.geocities.com/oop_guru/
> and I missed my favourite language Python (http://www.python.org)
I've read the O'Reilly Python book but not written any Python. It looks
nice, though the "local, global, builtin" scoping rule goes against all
the years of experience I have in other langauges! (The "LGB" rule is
that, although you can create nested lexical contexts -- blocks within
blocks -- only the names from the innermost one are visible, together with
global and built-in names.)
> I am just thinking about beginning learning Dylan. Considering the traffic
> in the news-groups
> of Dylan and Python my impression is Dylan is much less popular (and
> Python is much less
> popular than Perl). I wonder whether it is a good feature to write Dylan
> programs, translate them
> to C with the dylan2c compiler and use them as an extension module for
> Python to benefit from the
> speed of a compiled program while saving time (compared with C/C++
> programming).
You don't need to do it this way, exactly. Although the Dylan language
definition doesn't define an interface to C, both compiler implementations
(Gwydion's and Functional Objects') include such an interface. As well as
Dylan calling C, you can present Dylan functions as if they were C
functions, so it should be possible to access them from Python (or any
other language which can call C).
Actually, I have some time off work next week and I'm looking for a fun
little project to fill a day or two. If you have some example Python
code (<5000 lines, I think!), with a description of what core pieces you'd
like speeded up and Dylanified, I'd be happy to have a go :-) Just email
it to me here and/or at <hughg@functionalobjects.com>. Ideally it should
be Python code which can be released publicly (e.g., under the GPL), so
that others can see what I've done and how. Oh, and I'd be doing it under
Win32 only, for the moment, as I'm set up to use Functional Developer
which isn't available under Linux ... yet :-)
> ... Becoming more familiar with Dylan when speeding up some few critical
> Python code would be my preferred way...
Yes, a good idea. If I do the above Python/Dylan hybrid stuff, I'll
include a explanation and would be happy to answer any subsequent
questions.
Hope that's useful,
Hugh
References: