Prothon gets Major Facelift in Vers 0.1.0

Mark Hahn mark@prothon.org
Sat, 22 May 2004 18:41:50 -0700


Prothon version 0.1.0 has just been released.

Prothon has changed dramatically for those who have not seen it since it was
first announced.   For example: the "Perl-like" symbols are gone and the
"self" keyword is back, replacing the period.  Prothon has gotten more
"python-like", simpler, and more powerful, all at the same time.

There is a new tutorial that covers Prothon completely without assuming any
knowledge of Python or any other language. The Prothon/Python differences
page now has links to the relevant section of this new tutorial.

Some of these differences are:

Locals and globals are gone and replaced by a simple scheme that allows you
to access any local or external variable from inside a block or function
scope by name.  You may also modify any existing variable outside of the
current scope by simply prepending "outer" to the variable name as in
"outer.x = 1".  You can even do this "outer access" when the variable is in
a function that has quit running,  giving you "closures" with no need for a
special syntax.

There is a new powerful self-binding method syntax that gives you the
ability to explicitly specify the "self" to bind to a function call with
"obj.func{self}(args)".  This allows the full power of message-passing to be
used without compromising the simplicity of function calling.  This powerful
and general scheme also solves the problem of calling methods when there is
no such thing as a class to define what a method is.  Intelligent defaults
for {self} allow most method calls to be the intuiitive and simple form
obj.call().

The "with" keyword now just creates a new local scope instead of another
"self" which was so confusing before.  So "self" is now the simple meaning
of the instance object inside a method as it is in Python.

There is a new "object" keyword which works almost identically to the
"class" keyword, yet also works as a general object creation and
initialization statement.  It combines object creation and the "with"
statement.

See http://prothon.org.