[stack] Concatenative versus Compositionality
"Christopher Diggins" <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
On Dec 3, 2007 10:17 AM, William Tanksley, Jr <[email protected]> wrote: > > Christopher Diggins <[email protected]> wrote: > > FWIW I like your definition. > > In your blog you mention, For those who haven't seen it: http://cdiggins.com/2007/12/01/compositional-programming-languages-not-concatenative/ And some reddit discussion is at: http://programming.reddit.com/info/61win/comments/ > reasonably, that because we're uncertain > about the precise results of the term 'concatenative', we should use > another term; you suggest 'compositional'. That doesn't quite characterize my reasoning. The fact that there is uncertainty is not of concern to me. I am suggesting that the nature of these languages is not the concatenativeness (lets define this as meaning a language where whitespace corresponds to an operation) but rather the compositionality. Haskell is a language where concatenation denotes function application, and Joy is a language where concatenation denotes function composition. What unifies the langauges so far labelled as concatenative is that they are compositional (whitespace denotes function composition). > I disagree. Our uncertainty about the precise meaning of the term > mirrors the fact that these languages are very little studied; the > fact that we're a bit murky on the precise boundaries of our field > therefore only makes sense. Yes of course. > At the same time, your suggested term, 'compositional', is good; the > obvious problem is that it's already been used. A compositional > computer language is a language used only to bring together code > written in other languages; > > the language Piccola > http://www.iam.unibe.ch/~scg/Research/Piccola/ is a 'pure' example, From the Piccola paper "a composition language — a language for building applications from software components implemented in another, host programming language." IMO Piccola would be much better described as a "component oriented language". Howerver, that said: there is an overloading of the term "composition" in Computer science to mean either object/component composition and function composition. We could offer the distinction of "function composition language" for Joy et. al. whereas Piccola would be an "object composition language". > and I suppose the various shell scripts are impure examples. But > that's not broad use, and I don't see a severe problem with using it > anyhow. > > I also don't agree with your claim that Haskell qualifies as a > concatenative language. Am I wrong? Do any two valid Haskell programs > concatenated together form a valid Haskell program? No it is not true in the general case. But does the general case hold for Forth or Postscript? Does it also hold for all Joy programs without exception? I think however, the concatenation of programs is of less relevance than what it means to concatenate terms (i.e. expressions) in the language. Only looking at whether whole programs can be concatenated is too restrictive. Consider if we were to add some features to Joy (e.g. some kind of modularization constructs or scoping constructs) which meant that arbitary programs could no longer be concatenated, but the core semantics of the language were preserved: would that make the language an entirely new category? This an indicator that concatenation defined at strictly the program level is too narrow to merit a categorization. > My knowledge here > is limited, but I don't _think_ currying is that powerful -- _some_ > Haskell programs are 'concatenative' in that sense, but it's not a > general feature of the language, to the best of my knowledge. > Furthermore, if Haskell were concatenative, would that be bad? Nope, in fact it would be very good. Bridging the gap between compositional concatenative languages, and applicative concatenative languages would be an excellent thing for the community. There is a lot for members of Haskell and ML community to bring to the table. Nonetheless Jot (http://barker.linguistics.fas.nyu.edu/Stuff/Iota/) is an example of the a language where concatenation denotes application. This naturally leads to interesting ideas: what else could whitespace denote? Pick a combinator, and you have a very interesting esoteric language to study. (Hmmm: a language where whitespace could be changed dynamically ...). > I admit > that I did invent 'concatenative' with some vague idea of being > 'opposite' to applicative languages, but I don't think the category is > useless even if it's orthogonal rather than opposite. Yes, perhaps I overstated the case. If we broadened the term "concatenative" to mean something like a "language where the concatenation of terms is valid, and has semantic meaning (e.g. function application or function composition)". It would be a useful and interesting categorization, and one which I think is much more intuitively correct. I could see it as being a nice way to classify languages where whitespace has semantic meaning. It may be late in the game, where there is already a fair amount of momentum behind the usage of the term concatenation (and this wonderful community), but I still think it is worthwhile to try and be as accurate and intutiviely descriptive as possible with our terminology. Perhaps you are wondering why I am pushing back now. I am currently writing and submitting numerous articles for computer science conferences. I would like to write a paper introducing the "concatenative" category of languages, as something worth studying, but in fact I am only interested in compositional concatenative languages. I fear that the referees in the academic computer science community will bring up the same concerns that I am pointing out here. > > - Christopher > > -Wm Cheers, Christopher Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/concatenative/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/concatenative/join (Yahoo! ID required) <*> To change settings via email: mailto:[email protected] mailto:[email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/