Re: [stack] Parameters: ordered versus named
"Christopher Diggins" <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
On 9/8/07, Don Groves <[email protected]> wrote: > > On Sep 7, 2007, at 19:03 , William Tanksley, Jr wrote: > > > Don Groves <[email protected]> wrote: > > > >> The price we pay for the > >> simplicity of > >> concatenative syntax is the amount of parameter checking we must > >> do at > >> run-time which other languages to at compile-time. > > > > Not true. Concatenative semantics don't require parameter passing, so > > there is nothing to do to parameters at runtime. There are, of course, > > other prices we must pay; but that's not one of them. > > While it's true there's nothing to do "to" parameters, we still must > check for > their existence, yes? If you want to trap stack underflow before it > happens, > for example. And what do we do when a user enters a string and a number > then types "/"? This is where a static type system with type inference comes in useful. You can do all of this without annotation or runtime checks in the compiler. See Cat (http://www.cat-language.com). - Christopher