data strucutures in python

Daniel Berlin dberlin at redhat.com
Wed Sep 20 00:53:48 EDT 2000


kragen at dnaco.net (Kragen Sitaker) writes:


> 
> I was chatting with a coworker about this today.  He mentioned that C#
> has a neat way of declaring active properties --- you say something
> like:
> 
> class foo {
>   property lambda {
>     int get() { code here }
>     void set() { code here }
>   };
> };
> 
> and then the code in the get and set "methods" will be invoked to
> implement reading or writing the property "lambda" of any object of the
> class "foo".
> 
> I understand Sather, SELF, Smalltalk, and Delphi all have this
> ability.  It sounds like that's what the OP was asking for.

Of course Delphi does, it was designed and architected by the same guy
who did C#.
MS hired up all the delphi people at borland, and put them on hiatus
for the longest time.


He also added properties to C++ builder through adding his own
keywords to the langugae, which is the source of many
complaints of people trying to move C++ builder apps to other C++
compilers.

In fact, all he's ever seemed to do is add properties to things.
Not that this is good all the time.
--Dan




More information about the Python-list mailing list