Re: [myhdl-list] Feedback request on decorators in MyHDL
Brought to you by:
jandecaluwe
From: Haitao Z. <ha...@gm...> - 2005-10-21 21:21:52
|
Jan, I remeber reading an interesting thread on decorators in comp.lang.python. Some consider the decorator feature a hack on the polymorphic function, because it can not replace true polymorphism which is hard. So there is question whether this feature should stay with future Pythons. A main issue is that there were no truely good examples of usage pattern (polymorphic dispatch usage does not simplify the user interface since python function already supports arbitrary argument types) and often the dispatch through decorator is more confusing than explicit control statements. However I think your usage pattern in myhdl holds as a true example of how it can be used to the advantage on the user side. I don't think decorator will go away and this myhdl usage pattern strongly supports keeping decorators. It will be nice to make it more well known to the Python community. Very nice and pythonic discovery indeed. Haitao On 10/21/05, Jan Decaluwe <ja...@ja...> wrote: > Hi all: > > The past 2 weeks have been intensive and fun, as I have > worked on an exciting new feature for 0.5: decorators. > > I am about to introduce this in MyHDL, and it has the > potential of being quite significant (but backwards-compatible, > don't worry) - for the better. > > I want to avoid making mistakes in all the excitement, so > here is your chance to provide feedback. I have written a > MyHDL Enhancement Proposal (MEP) that documents the feature: > > http://myhdl.jandecaluwe.com/doku.php/meps:mep-100 > > For those interested, a first implementation is available > in snapshot 0.5dev2, available on the web site. > > I will now turn my attention to other MyHDL issues until > the beginning of November, so you busy people have some time > before I make the final decision to go ahead. > All kind of feedback is welcome, but especially if there > is something that you don't like. > > Regards, > > Jan > > -- > Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com > Losbergenlaan 16, B-3010 Leuven, Belgium > Electronic design with Python: > http://myhdl.jandecaluwe.com > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads, discussions, > and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > |