New SIG on logic/CLP programming in Python

Nicolas Chauvat nico at aries.logilab.fr
Fri Mar 22 12:44:20 EST 2002


Hello Pythonistas,

I'd like to entertain you with a new subject: logic programming and
constraint-propagation features in Python.

I teach Python and advocate it often. One argument I use is that you
have several "programming paradigms" available in Python. You need
simple things and scripts? Use procedural programming, with variables
and functions. You need more structure? Use object-oriented programming.
You miss Lisp and need to process lists? use (some) functionnal
programming. You need concurrency? Look at Python 2.2's future and
stackless. It's all there. Mix'n match as you wish, you're not tied to
a specific approach, just use what fits best your model and data. No
need to mix languages.

Now, what if you need logical programming? Use pyprolog. And copy
your data back-and-forth from prolog-space to python space. Or look
at Mozart/Oz. Yeah, it's all there too: procedure, functions, objects,
concurrency, logic, constraint-propagation, even distribution and
security.

Right, but the syntax is... difficult. I'm sorry to have to tell
Mozart folks lurking here, that I'm a big fan of "indent-what-you-mean"
and will have trouble telling our new programmers that this complicated
syntax is good for them. And that brackets have different meanings
depending on where they are.

And Python already has a user-base that's increasing at rocket-speed.
When teaching Python I often tell people "if you need to code something
in Python, go to google first, you'll probably find it there and move
to more important matters".

As you already understood, I am thinking about implenting some
logical/constraint-propagation features on Python. My (rough)
understanding is that is would be doable on top of
microthreads/stackless/generators.

I am looking for interested people to form a Logic-SIG or CLP-SIG.
You think this is a great idea? You think this is stupid? Please
speak up! If you have no idea what I am talking about, don't worry,
I'll try to post an example here this week-end.

Waiting for your comments.

-- 
Nicolas Chauvat

http://www.logilab.com - "Mais où est donc Ornicar ?" - LOGILAB, Paris (France)



More information about the Python-list mailing list