Path: utzoo!attcan!uunet!cs.utexas.edu!rice!uw-beaver!uw-june!jmaloney From: jmaloney@cs.washington.edu (John Maloney) Newsgroups: comp.object Subject: Re: Objective-C review Message-ID: <12396@june.cs.washington.edu> Date: 27 Jun 90 18:41:03 GMT Organization: U of Washington, Computer Science, Seattle Lines: 30 In reply to Brad Cox's statement: > what about a C-based varient of Smalltalk Blocks? I think that blocks (or "closures", to be technical) are an extremely valuable language mechanism. They allow all sorts of customized control structures to be synthesized without extending the language semantics at all. For example, the Smalltalk-80 *language* has no control flow mechanisms other than blocks. Everything else -- if-then-else, loops, iteration over collections -- is implemented using blocks. While we're wishing: I think that end-user customization is going to be increasingly desirable, especially in user interfaces. That is, end-users will increasingly write little mini-programs to tailor applications to their precise needs. What language should they use to do this? Why not Smalltalk, Objective-C, or Lisp -- i.e. the language of the base application? This obviates the need for a custom language and its interpreter. In Smalltalk, it is quite easy to compile a string typed by the user into a custom code fragment that can be executed by the application at appropriate times. For example, the user might customize the behavior of a button or add a new item to a menu. What I'm suggesting is that programs like HyperCard would not need to supply a "HyperTalk" language if they could use C++ or Objective-C as the customization languague. Smalltalk and Lisp already allow this. It is harder to achieve in the C-based OOP dialects because: a) the compiler is not usually part of the run-time system, and b) symbol table information needed for variable bindings is often removed during compilation. I would thus like to add "dynamic compilation and binding" to the wish-list. -- John