Prothon gets Major Facelift in Vers 0.1.0 [Prothon]
moma
moma at example.net
Sun May 23 05:24:35 EDT 2004
simo wrote:
> One thing that might attract me from Python to Prothon is if it had
> proper private medthods - i.e. not just name mangling like __myDef
> which can be overridden using _myClass__myDef (as the interpreter
> does).
>
> Proper encapsulation is needed before the C++ brigade will take
> P[y/ro]thon seriously as an OO language, oh and a machinecode compiler
> ;-)
PROthon should implement {...} as optional block-beg and end marks.
# Original PROthon code (uses indentation)
def abc(_x):
if _x ...:
do_1()
do_2()
do_3()
Could become
#!/usr/bin/pROthon
#pragma(C_STYLE_BLOCK=1) # <- Valid within this file/module scope
def abc(_x):
{
if _x ...:
{
do_1()
do_2()
}
do_3()
}
----------------------------------------
The lack of "class" type and direct creation and use of objects is very
handy for "Prototype-based Programming" (that's PROthon)
Who said OO-programming must have a class type ?
// moma
http:/www.futuredesktop.org
More information about the Python-list
mailing list