Re: [stack] Parameters: ordered versus named
"Christopher Diggins" <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
> That's because concatenative languages, in general, don't hide > information; but I agree that if you do hide information, you have to > pay the price. I was also illustrating that the price to be paid > wasn't what you thought it was -- Cat pays the price not by being more > primitive, but by having a sophisticated static type inference system > (which can, of course, slow some things down, but is undeniably NOT > primitive and is a desirable feature for many purposes). A static type inference system certainly slows down compilation, but all things given equal should speed up runtime execution because it removes the need for runtime checks. Furthermore a static type inference system makes it easier to optimize code, because you can take advantage of properties that you have elucidated about the runtime behaviour. However, every implementation is different. A simple static type system has the disadvantage that typed terms will disallow unbalanced stacks. You can't say things like: if_tuesday [1] [1 2] ifte // does stack have one or two elements? - Christopher