Re: [stack] language hierarchy
John Nowak <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
On Dec 5, 2007, at 10:13 AM, William Tanksley, Jr wrote: > Hmm. Okay, I think I get it. Review: composable means that function > composition is available and capable of forming interesting programs. > Concatenative means that function composition is the default operation > (performed by merely concatenating functions). No, not quite. Composable means composing functions is the only way to write programs. Joy works this way. Concatenative languages are composable languages with Joy-style syntax. I do not know of any language that is composable and not also concatenative; It's the obvious syntax to use. However, you can imagine such languages fairly easily. >> I don't think there's anything composable about Haskell, strictly >> speaking. The compose operator in Haskell is really just a function >> with infix syntax that operates on functions /as values/ via function >> application. > > Perhaps, but the language supports that composition on such a > fundamental level that it's hard to identify it as NOT part of its > syntax. It isn't any more part of the syntax than 'apply' is part of Cat's syntax. > A number of different subsets of Haskell can be constructed > that form a composable language -- for example, consider a stack > monad. At least if I'm reading your definition of 'composable' > correctly. No, I don't think you are. The compose function in haskell operates on values via application, not on functions directly as it does in Joy. Haskell is a functional language, not a function-level language like FL. >> This is something you can add to most any vaguely >> functional language: >> (define (compose f g) (lambda args (f (apply g args)))) > > Sure; and if you can define that as infix, your language has > superficial support for composability. Neither infixness, nor any other syntax-related feature, has nothing to do with my definition of 'composable'. > think your definition is adequate, so let's go forward with it. Hm. Well, I will at least! - John