[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rather, DSSLs increase modularity, productivity
On Nov 20, 2003, at 6:40 PM, Daniel Silva wrote:
>> I'm not a Python expert, just a casual user. But I don't see why
>> someone couldn't add (optional) type declarations to Python, with
>> Dylan-ish semantics. Then you could do Dylan-style compilation and
>> get
>> better performance for your Python.
>
> Because you can do this:
>
> class C(object): pass
> class D(object): pass
> myc = C()
> print myc # <C object>
> myc.__class__ = D
> print myc # <D object>
Which is why you should use Self-style compilation instead, and get the
performance gains without the type annotations. There may be many good
reasons to add static type declarations to a program, but performance
isn't one of them. This was nicely demonstrated by the Strongtalk
compiler, which aggressively optimized the code while *completely
ignoring* the optional declared types. At least when it comes to
object oriented method dispatch, manifest typing and performance are
orthogonal concerns.
- References:
- Re: dual-language systems increase modularity
- Re: dual-language systems increase modularity
- From: Michael Vanier <mvanier@cs.caltech.edu>
- Rather, DSSLs increase modularity, productivity
- From: Mike Newhall <mike@newhall.net>
- Re: Rather, DSSLs increase modularity, productivity
- From: Michael Vanier <mvanier@cs.caltech.edu>
- Re: Rather, DSSLs increase modularity, productivity
- From: David Lichteblau <david@lichteblau.com>
- Re: Rather, DSSLs increase modularity, productivity
- From: Michael Vanier <mvanier@cs.caltech.edu>
- Re: Rather, DSSLs increase modularity, productivity
- From: Bob Cassels <bobcassels@netscape.net>
- Re: Rather, DSSLs increase modularity, productivity
- From: Daniel Silva <dsilva@ccs.neu.edu>