functional programming

skaller skaller at maxtal.com.au
Sat Feb 26 16:50:50 EST 2000


Tim Peters wrote:

> That is, Python wasn't designed to support programming in these styles, but
> is flexible enough that you can force it to work.  Python was designed to
> support a variety of OO & "imperative procedural" styles instead.

	Vyper, on the other hand, is designed to do functional
programming well, but you can 'force it' to make Python work too :-)
[you do this by coding your module in a .py file, use a .vy file
for the full thing]

	The latest version even supports 'pattern matching' like in ML,
with a pythonic twist. As you know, Python allows an escape from
block structure using bracket balancing rules -- Vyper also supports
the converse, allowing an arbitrary suite to be nested in an expression
using enblock <: and deblock :> symbols. Such an expression-nested suite
has the same value it would were it a nested parameterless function,
namely None unless something is 'return'ed.

	Combined with lexical scoping, Vyper is a fairly reasonable
dynamic functional language, as well as being procedural and object
oriented :-)

-- 
John (Max) Skaller, mailto:skaller at maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
checkout Vyper http://Vyper.sourceforge.net
download Interscript http://Interscript.sourceforge.net




More information about the Python-list mailing list