chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] with-*-*-port


From: Joerg F. Wittenberger
Subject: Re: [Chicken-users] with-*-*-port
Date: 02 Mar 2003 16:34:30 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

felix <address@hidden> writes:

> Joerg F. Wittenberger wrote:
> >>
> >>What about
> >>
> >>(current-input-port <PORT>)
> >>
> >>?
> >>
> >>It may be questionable (from a language lawyerly point of view), but
> >>it's pretty handy...
> > Really bad practice.  (Said with bitter sound from 20 year of
> 
> > experience. ;-)
> 
> Oh. But it does interact nicely with `parameterize', though.
> Conceptually I see `current-input-port' as a parameter
> (And PLT actually defines it as one. And SRFI-39 does in fact
> require it to be a parameter).
> 
> But, to be frank, I don't really try to make a statement
> about "the right way" of coding practice. I leave that to
> the users. If one finds it useful, use it. If one finds it
> offensive, then don't use it.

Fair enough.  Neither do I want to impose anything upon users.

This discussion goes a bit towards the whole programming language
topic.  I really prefer pure functional programming for several
reasons.  It allows additional optimizations (like here), clarity of
the code up to the point that we can proof correctness (most mistakes
I found in my own code usually derive from side effects) and easy of
teaching (yes, if you don't tell novices that you are teaching them
"the right way" you'll observe them picking up pure functional
programming a easier than when you start with side effects).  How many
out there ever wrote an Excel-Sheet with Formulas?

> Sorry, that costs too many processor cycles... ;-)

;-)

> But seriously: It's not the job of an implementation to teach
> people how to code. If someone wants to use the side-effecting
> form of `current-input-port', then let them. And I want to be
> able to use `parameterize' on it.

That's true.  It's a matter of aim.  I understand that, as soon as
things like SRFI 39 are to be supported, we have to pay the penealty.
And for a proper Scheme system, it has to be like that.

Actually, _I_ need a Scheme compiler just as a core language.  People
like me can always overwrite the standard definitions with more
restictive versions.  So I wan't argue any longer.

best regards

/Jörg
-- 
The worst of harm may often result from the best of intentions.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]