Re: Programming languages for the very young
From: Michael D. Ober (obermd-._at_.-alum-mit-edu-nospam)
Date: 01/30/04
- Next message: Joe Marshall: "Re: Programming languages for the very young"
- Previous message: jmdrake: "Re: Programming languages for the very young"
- In reply to: Ray Dillinger: "Re: Programming languages for the very young"
- Next in thread: Joe Marshall: "Re: Programming languages for the very young"
- Reply: Joe Marshall: "Re: Programming languages for the very young"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Jan 2004 13:16:40 -0700
"Ray Dillinger" <bear@sonic.net> wrote in message
news:401AAF72.4F24656C@sonic.net...
> "Michael D. Ober" wrote:
> >
> > "Joe Marshall" <jrm@ccs.neu.edu> wrote in message
> > news:3c9yep0t.fsf@ccs.neu.edu...
> > > "Michael D. Ober" <obermd-.@.-alum-mit-edu-nospam> writes:
> > >
> > > > The last time I looked, all processors except the IBM mainframe
> > processors
> > > > have machine level SUB and RET instructions. These are the two
> > instructions
> > > > required for subroutines.
> > >
> > > You only need a conditional branch to get subroutines. It's a pain,
> > > but you can do it.
> >
> > Actually, BAL does it with unconditional branches. My point was that
> > subroutines are part of the stack machine model that just about every
> > processor uses and that processors support them in machine code.
>
> Yeah, okay. I'm not using the "native" subroutine instructions, because
> Scheme continuations require a non-stack model of call frames. I honestly
> thought those were just macros provided by my macro-assembler, but I
> guess not. I am using ASM conditional branches to implement subroutine
> calls.
>
> Bear
It's been 20 years since I used Scheme, but I vaguely remember that Scheme
doesn't readily lend itself to subroutines. Scheme programs tend to be tail
recursive, making conditional branching the most efficient method for
subroutine calling.
Mike.
- Next message: Joe Marshall: "Re: Programming languages for the very young"
- Previous message: jmdrake: "Re: Programming languages for the very young"
- In reply to: Ray Dillinger: "Re: Programming languages for the very young"
- Next in thread: Joe Marshall: "Re: Programming languages for the very young"
- Reply: Joe Marshall: "Re: Programming languages for the very young"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]