KBD

Keith Devens .com

Friday, July 4, 2008 Flag waving
What you are thunders so loudly that I cannot hear what you say to the contrary. – Ralph Waldo Emerson

Tag: OOP

Parents:

Children:

Daily link icon Friday, March 3, 2006

Transmuter Programming Language

Transmuter Programming Language (via PLNews):

The Transmuter Programming Language, or Trans for short, is a new dynamic programming language that has been under careful design and development for several years, and is currently in an initial testing phase. Trans is a biologically inspired language, providing a framework for experimenting with naturally evolving systems of objects over the net, and for exploring new ideas about recombinant software, code morphing, and evolutionary programming in general. The Trans model is an ambitious attempt to fuse modern programming language paradigms with novel evolutionary programming techniques. It is a modern object-oriented dynamic language with a built-in capacity for evolutionary transformation.

The code looks clean, and the source code to Trans is public domain (that's real freedom in software). Plus, it's got a prototype-OO system, and I love prototype OO. I can't comment on the "evolutionary" features as yet, but the threading system looks super easy (though it's not yet documented enough to use).

Daily link icon Thursday, March 2, 2006

  1. James Manning's blog : error CS1501: No overload for method 'Base' takes '0' arguments. Why don't more languages come with 'unified constructors' like Python (and even PHP, now) does? Wouldn't that fix the problem?

       (0) Tags: [C#, OOP, PHP, Python]

Daily link icon Monday, February 13, 2006

C++ Reference Guide > The Rise & Fall of Object Orientation

C++ Reference Guide > The Rise & Fall of Object Orientation:

Exceptional C++ Style, by Herb Sutter, contains a systematic analysis of class std::string. Sutter shows that the majority of its member functions can actually be replaced with existing STL algorithms, at least in theory. He also provides plenty of reasons why this approach is better. The four mini-chapters dedicated to this issue are indispensable for anyone who is interested in learning how general purpose libraries should be designed today. It's surprising to see that the original notions of OOP such as inheritance, virtual functions and member functions have become so antiquated and cumbersome in the last 10 years. Undoubtedly, were class std::string to be re-designed from scratch today, it would offer a cleaner, slimmer and more consistent interface

Via Top Ten of Programming Advice to NOT follow, by Kristian Dupont Knudsen, which is somewhat worth a read in its own right. (That link via Keith Gaughan.) I didn't agree with all of it, but I did like this bit:

Oh, and my favourite specialization of the comments advice: keep a history of changes and author info etc. in the top of each file.
I've never actually heard anyone say that you should do this but I have seen it so many times that there must be people out there recommending it. Why on earth you would clutter the code with information that so obviously belongs in the version control system is just beyond me.

Daily link icon Wednesday, December 14, 2005

Python's metaclasses

Dev Shed has an excellent introduction to Python's metaclasses (via DPU). I get it now:

  • Python's metaclasses are just normal classes that inherit from type
  • When you instantiate a metaclass the object returned is itself a class
  • To declare that a class has a given metaclass, set the __metaclass__ data member to the metaclass when declaring the class.
  • The metaclass' __init__ method is called when a class that has it as its metaclass is declared (__init__ for metaclasses takes (klass, klass_name, base_classes, dict_of_attributes) as its parameters).

And that's it (according to the article). So, it seems that Python very nearly has a prototype-based object system, but not quite. (And I ❤ prototype-based object systems.) With a prototype-based object system the distinction between metaclasses and classes (heck, and objects) goes away, so it seems to me that you could do the same thing as what Python calls metaclasses simply by overriding a particular object's clone method. Am I wrong?

July 2008
SunMonTueWedThuFriSat
 12345
6789101112
13141516171819
20212223242526
2728293031 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 5 posts

Recent comments XML

Girls, please don't get breast implants

> And no, you will not be receiving​a picture.

:-(...

Keith: Jul 2, 6:05am

Javascript clone function

This is a clever way to clone an​object if you are using YAHOO UI.​Same tec...

Antonio: Jul 1, 12:47pm

I hate Norton Antivirus

Oh just one other thing norton is​great at keeping people out of your​compu...

kevin.sands: Jul 1, 12:50am

Terminator 3 was awful

I think the biggest reason why T3​totally blew was because Edward​Furlong g...

76.167.172.64: Jun 29, 3:06am

Generated in about 0.132s.

(Used 11 db queries)

mobile phone