[Python-ideas] Python as meta-language

Ron Adam rrr at ronadam.com
Sun Dec 24 16:38:57 CET 2006


Talin wrote:
> One of my long-standing interests is in mini-languages, particularly 
> declarative languages. I'm always looking out for examples where a 
> declarative language is used to represent some idea or concept that is 
> not easily written in an imperative language. Examples are the behaviors 
> of particle systems, kinematic constraints, formalized grammars, logical 
> inferencing systems, query languages, and so on. In other words, you are 
> using a language to describe a complex set of relationships, but you 
> aren't giving specific commands to execute in a specific order.

This sounds like a wide range of things.  Maybe even a bit too broad.  Can you 
narrow it down a bit.

The first thing that comes to mind for me is Visual's modeling system with both 
an internal C loop for handling the defined objects, motions, colors, lighting 
and updating the screen, but it also allows modifying and querying the models 
while everything is moving around in a python loop.  In this case extending the 
background processing vs foreground processing would be good.

When dealing with real time, or 1/nth time for slower computers, the preferred 
ordering would be given the faster changing objects. Those values should be 
updated or checked more frequently.  So it's not a procedural problem where 
doing things in a predefined order is the best way.

> What I'd be interested in doing, in this python-ideas list, is 
> brainstorming some ideas for how we can improve Python's ability to 
> 'host' other kinds of mini-languages within the Python syntax. We can 
> start perhaps by examining some of the use cases I listed in the first 
> paragraph - particle systems, etc - and see how one would want to 
> represent those kinds of semantic structures within Python.


Another (possibly related?) idea I think might be useful is to incorporate the 
concept of responsibility, authorization, delegation into the language more 
directly.  In a (well run) business responsibility and authority are delegated 
in a way that gives the employee the ability to succeed, while also protecting 
the interests of the business owners(s) by not giving too much power to any one 
employee.  These are good business practices and I think they could be useful 
concepts if implemented in a computer language in a more formal way.

Cheers,
    Ron Adam





More information about the Python-ideas mailing list