Path: utzoo!yunexus!ists!jarvis.csri.toronto.edu!mailrus!uunet!aplcen!samsung!usc!snorkelwacker!bloom-beacon!eru!luth!sunic!mcsun!ukc!dcl-cs!aber-cs!emerald!pcg From: pcg@emerald.cs.aber.ac.uk (Piercarlo Grandi) Newsgroups: comp.object Subject: Re: object-oriented this, that, and the other thing Message-ID: Date: 18 Nov 89 13:52:45 GMT Article-I.D.: emerald.PCG.89Nov18135245 References: <1471@aber-cs.UUCP> <914@castle.ed.ac.uk> <1561@novavax.UUCP> <352@m1.cs.man.ac.uk> Sender: pcg@aber-cs.UUCP Organization: Coleg Prifysgol Cymru Lines: 52 In-reply-to: mario@r3.cs.man.ac.uk's message of 6 Nov 89 17:30:49 GMT In article <352@m1.cs.man.ac.uk> mario@r3.cs.man.ac.uk writes: Piercarlo Grandi states: > 3) most FP languages have and emphasize functionals and generators > (non nested control flow), that make many complex program > structures much simpler, and they are not as used or available > (regrettably) in OO languages, and this accounts for *a lot* of > the difference (even if functionals and generators are not that > easy to formalize, let me observe :->). Hmm, I wonder what what these Smalltalk expressions are if not functionals and generators ... double := [ :f | [ :x | f value: (f value: x)]]. someObscureCollection do: [ :each | each process ] Oh yes, Smalltalk has some good support. But, but, of all people you are the one to know that blocks in Smalltalk have some disagreeable property that greatly limits their usefulness as closures/etc... And where is detach/resume? (well, in processes, but this seems a bit overdone). Anyhow, I could argue that any OOL with dynamic binding was using functionals all the time: every reference to an object also implicitly references its methods. Uhmmm. This is straining things a bit.... :-> Those who program in Smalltalk already use closures an awful lot, and even a form of continuation (albeit somewhat restricted) that to me is much nicer than than most mechanisms built into other languages for non-stack-based control flow. As to that, Simula 67 was *the* thing as to coroutines, generators, etc... (resume and detach); indeed I could argue that object oriented features were invented and added to Simula I/67 precisely because non nested flow control is essential to writing simulations. On the other hand, OO programmers in languages other than Simula 67 (and a few others, like in some way Smalltalk) do not have resume/detach, or are not familiar with funtionals. Too bad. It need not be the case. Well, I ten to agree that Smalltalk for one has nice FP like technology, no doubt inspired by Interlisp among others; but unfortunately Smalltalk is not what most people know as an OO language. The likes of Object Pascal, C++, Ada (argh!) are associated in the public's mind with OO programming. -- Piercarlo "Peter" Grandi | ARPA: pcg%cs.aber.ac.uk@nsfnet-relay.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcvax!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk