Python 1.6 The balanced language

Suchandra Thapa ssthapa at harper.uchicago.edu
Sat Sep 2 19:27:13 EDT 2000


Manuel Gutierrez Algaba <thor at localhost.localdomain> wrote:
>For me functional language equals to LISP, common LISP. The issue
>about types was from start a matter of size of data in memory. Then
>mathematicians came in and they saw it was nasty, so they founded
>theories on it.

    Lisp, especially Common Lisp, isn't really considered all that 
functional.  Even the people in comp.lang.lisp would probably agree with 
that. 

>Probably , Haskell and ML have got infested with that plague. 
    
    Plague?  With an expressive type system you can readily guarantee that
your variables satisfy constraints that the program requires them to.  So
instead of putting asserts or testing to make sure that a variable has the
proper range of values, you can express these same conditions within the 
type system and not worry about it in the code.  Having this stuff done 
at compile time is a bonus since it means that your program does not have
to worry about type checking at run time.

>I see functional as "flow", while OO as "matter". The duality
>energy(flow)-matter rules in physical world and IT. Types could be
>the size of quanta, which is the less interesting part of the story.

    Actually, the size of the quanta is probably the more interesting 
part since it corresponds to alot of the physical phenomena that we
see.  For example, knowing that the electron orbitals of a molecule or
atom are discrete due to the wave properties of the electron is useful, but
knowing the size of the gaps between the orbitals is even more useful since
it allows us to identify compounds by various spectroscopic methods.  In a
slightly more germane example, the bandgap in semiconductors would be 
equivalent to the size of your quanta.  Knowing the size of the band gap
determines how useful the semiconductor is for making chips, after all it
wouldn't be very helpful for energy on the order of kT to bump electrons
into the conduction band.

>As long as a "language let the data flow" (without blocking in
>a struct or object) the language behaves in a functional manner. 
>Types seems stupid attempts to give shape to a liquid, to a flow.
>It's the same if the "pipe" is rounded or square, the liquid/flow
>adapts to it, but you have bad times when joining different pipes. 

    Functional languages usually imply that you write programs using 
functions in behaviour similar to mathematical ones.  This basically 
implies that you can't use state in your programs since a mathematical
function's output is determined solely by its input.  Incidentally, the
shape of the pipe is very important to the fluids.  Square pipes would 
induce turbelence and would cause more frictional losses at the same velocity 
than a round pipe.  The end result would be that you would need a more powerful
pump to get the liquid through the pipe at the same velocity.



More information about the Python-list mailing list