Mar 16, 2009

Just a crazy idea.

So i was thinking about pylog yesterday. I still haven't had time to really figure it out yet, but the idea of having bindings for a logic programming language really intrigues me. In particular I had an idea for an application for it.

Lets say i have a map class which is a 2d array of tiles, and each tile stores information about the map at the location: height, terrain, etc. I might have another class called cartographer which does stuff with the map class but unfortunately the cartographer and the tile class are interlinked. If i want the cartographer to give a certain tile a color, I would have to make a color field in the tile class.

Now obviously the solution is to have a space that can be written to in some notation (maybe xml,yaml) and then be reinterpreted by the cartographer class. This of course isn't done because its not practical and not a really common feature of any language i can think of.

But wouldn't it be really cool if these spaces for writing were actually little spaces of logic programming who all used common rules. Im not sure that this is the right encapsulation, but it would be fun.

ps. i need new hobbies for doing in class.