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

Re: [Scheme-reports] when and unless

On Fri, May 20, 2011 at 11:31:14AM +0200, Pierpaolo Bernardi wrote:
> On Thu, May 19, 2011 at 23:42, John Cowan <cowan@x> wrote:
> > Oh yes.  I'm saying that people coming into Scheme (which we want to
> > encourage) will say "Where's the while loop?" and there should be a more
> > newbie-friendly answer than "Use named LET."

Yes! That's one way to teach programming (functional style). :-)
It works with Scheme and Haskell (although it's not usual to see
Haskell being taught as a first language).

> But if WG2 will supply a full featured loop, then these two macros will be
> redundant, and newbies anyway complain about the parentheses.  8^)

> Also, while and until macros encourage bad habits.  Do we want to
> attract beginners by making them write fortran code in parentheses?

I agree. This is particularly important when you want to make people used
to Java/C to actually understand recursion and functional programming --
it's not that it's "wrong" to use loops like for, while, etc, but
learning to program without those control structures make the programmer 
more flexible and open to interesting solutions to problems.


Scheme-reports mailing list