basic language question
mpeuser at web.de
Thu Sep 4 22:27:36 CEST 2003
"John Roth" <newsgroups at jhrothjr.com>
> "Michael Peuser" <mpeuser at web.de>
> > There is a very old religious law saying: Thou shalt not cause side
>> effects by a function.
> > There is some wisdom in it but it is easily forgotten with languages
> > do not differ between functions and routines.
> Like most "religious laws," it's a rule that has a multitude of
> You can't do I/O without having side effects, something that the designers
> of functional languages have learned, sometimes the hard way.
Stream I/O can never be done right in functional languages. The only
solution is to use something like memory mapped files (which I do more and
But look at this mess:
There are solutions in some languages with _routines_ and
_call-by-reference_ but it it is generally very clumpy.
On the other there is a growing popularity of generators and iterators which
by concept are *heretic*
More information about the Python-list