Code/Data Duality - request for help

Brent Pinkney pinkney_b at aircom.co.za
Tue Jun 24 13:19:30 UTC 2003


Hi,

I was wondering if some of the deep thinkers on the list could help me explain to my collegues what mean when I (im my own words) refer to code/data duality and its benefits to the developer.

What our application needs, and I know I am phrasing this poorly, is to exploit the duality between code and data. Sometimes an object behaves like code -i.e it controls the behaviour of the application, and other times it behaves like data - passive stuff which is stored, retrieved, end manipluated.

Concrete examples are configuration files, user defined rules, etc.

To me, it is a spectrum - at the extremes some parts are always code and others always data, but we spend an awful amount of time creating settings and preferences, embedded VB parsers for callback functionality, and elaborate import and export utilites.

Some simple experiementation with Smalltalk suggests that is is a lot easier if I can regard my code as data and then interpret/execute it later.

Clearly languages like C++/Java/C# battle with this, whilst languages like Smalltalk/Lisp excel.

I realise I am begin vague - hence the request.

Any pointers ?

Regards

Brent



More information about the Squeak-dev mailing list