home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / tcl / 1210 < prev    next >
Encoding:
Internet Message Format  |  1992-08-17  |  9.7 KB

  1. Path: sparky!uunet!olivea!decwrl!sdd.hp.com!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!<UNAUTHENTICATED>+
  2. From: Sean.Levy@cs.cmu.edu
  3. Newsgroups: comp.lang.tcl
  4. Subject: Class-free object systems and other religious beliefs
  5. Message-ID: <YeY57T200h5KN7atF1@cs.cmu.edu>
  6. Date: 18 Aug 92 01:26:55 GMT
  7. Organization: Carnegie Mellon, Pittsburgh, PA
  8. Lines: 148
  9.  
  10. A few random notes that might make my eariler post more comprehensible:
  11.  
  12. 1) Self 2.0 has just been released by the Self group, which is now at
  13. both Stanford AND Sun. The license, so far as my poor faculties can
  14. determine, makes it essentially unencumbered (thanks, Sun -- I thought
  15. you had hired them all to make a product out of it!). Unfortunately,
  16. they appear to be phasing out support for the sun3 (yeah, I know, big
  17. deal), which means that the only platform it works on is the sparc. As a
  18. major part of Self (and, in fact, one of the major foci if not THE major
  19. focus of their research) is their very heavy-duty compilers (which are
  20. not, I fear, easily retargettable), I can't use it for my work -- but,
  21. with 2.0 you DO get full source code. This platform limitation is the
  22. major reason why I wrote BOS. Although the two languages differ greatly
  23. syntactically (tcl is basically BOS' syntax, whereas Self is based on
  24. Smalltalk) and in internal details (I didn't implement method caching,
  25. namespace separation, and don't have terribly good support in the System
  26. class for multiple inheritance (you can do it easily by hand, but the
  27. basic primitive to create a "subclass" doesn't grok it)), all of my
  28. inspiration came from the Self folks. In particular, I must reiterate my
  29. plea for anyone at all interested in object-oriented systems (I use OOS
  30. as shorthand for OOPL, OOPE, OODBMS, and all the other OOisms) to ftp to
  31. self.stanford.edu and pick up a copy of The Self Papers, as well as Self
  32. 2.0. The Self papers describe in great detail the design, implementation
  33. and philosophy of Self, and show how class-free object systems can be
  34. used to build any other kind of object system you want
  35. (single-inheritance ala Smalltalk, MI like CLOS or, etc. etc.). They are
  36. really the occam's razor of object-oriented systems. They are also very
  37. easy to implement (the source code for libbos is a measly 7781 lines,
  38. though I admit it could have more bells and whistles and still be as
  39. simple on the outside).
  40.  
  41. Now that I have BOS, I'm not so sure I would switch to Self even if it
  42. ran on everything; the incredible ease I bought myself for free in
  43. mixing C and interpreted code, the ability to have C call bos/tcl as
  44. easily as bos/tcl call call C, the lack of any problems in transfering
  45. arguments between the two (this is a bit of a headache in Self 2.0, just
  46. like in *-lisp and Smalltalk), and the ease with which I've integrated
  47. other programmers into working with BOS has convinced me that I'm on to
  48. something, even if I'm the only one that ever uses it.
  49.  
  50. I do plan on doing at least things like method caches and private slots
  51. to BOS before the compiler. Actually, I would like to have all of the
  52. machinery the Self folks have in place in my environment for figuring
  53. out when methods should be compiled and how they should be compiled
  54. (Self automatically compiles your methods for you when they have been
  55. invoked so many times (a user-settable param), and can be smart about
  56. inlining them, caching them, etc., and can undo the whole bit without
  57. your knowing it). At the very least, I can use it for profiling.
  58.  
  59. 2) I am not at all an opponent of lisp. In fact, until I met tcl, I was
  60. a dyed-in-the wool, HARD-CORE lisp hacker. Any kind of lisp, you name
  61. it: WOOL, elk, SIOD, scheme, {allegro,lucid,kibuki,*} common lisp, zeta
  62. lisp, NIL, franz lisp, xlisp, elisp, PSL, Mocklisp; If I could've made a
  63. lisp interpreter my login shell, I would've. I even took the elisp
  64. interpreter out of emacs and turned it into a C-callable library WAY
  65. back when (had too many problems with elisp's idea of GC and other
  66. problems (mostly lack of time to hack on it)). I've said it before, and
  67. I'll say it again, IMHO tcl embodies the BEST (not all!) features of
  68. things like lisp (and, with bos, smalltalk) while at the same time
  69. buying you substantial gains in the crucial, CRUCIAL area of
  70. integration. Its not like I haven't done scads of work in lisp; I've
  71. tied together solid modelers written in lisp (Alpha_1, written in PSL)
  72. with expert systems written in ops and analytical programs written in C
  73. and fortran. I've written GUIs in lisp. I've built distributed systems
  74. in lisp. Etc. Etc. In my experience, when you start wanting to build
  75. systems that work the same way across platforms, mix lisp and C and
  76. fortran, have to talk with other programs and packages, start to get
  77. really big, need to work in a distributed environment, need to meet hard
  78. performance criteria, etc. etc. you start to bump your head against the
  79. limitations of all current implementations of lisp I've used; the
  80. development environment you have to work in for the lisp portions of the
  81. system IS (usually) really neat-o, but then there are all those other
  82. bits you have to work on, which aren't usually so neat-o, and then
  83. there's the bit of tying them together, which DEFINITELY isn't so
  84. neat-o.  This is not to say that lisps don't have features that tcl
  85. lacks, that things like this cannot be done with lisp (I've bloody DONE
  86. them, ok?), that tcl is better than lisp in some pure, platonic way, or
  87. anything like that. It is a purely pragmatic observation, and I believe
  88. owes its validity as much to market issues, perception issues, legacy
  89. issues and all sorts of other things IN ADDITION to technical issues.
  90. Yes, tcl doesn't have circular data (BOS does, but nevermind that). Yes,
  91. tcl doesn't have closures (although you could implement them). Yes, tcl
  92. doesn't have a debugger. Or bignums. Or documentation strings. Or
  93. packages. I know all of that. Never the less, I've managed to (a) build
  94. substantial amounts of software using it as a BASIS (not as the total
  95. environment, as I've pointed out so tediously already), and (b) live
  96. without all of the things I listed above (and others). I even, get this,
  97. live without a garbage collector (gasp!). How I do this is beyond the
  98. scope of this already-too-long missive, but I'd be happy to get into it
  99.  
  100. In short, I don't use lisp for the same reason I don't use heroin. Yes,
  101. it is REALLY nice (well, so I've heard), but then there's that god-awful
  102. wakeup call if you stop using it. Tcl is sort of like methodone (ok, now
  103. I've opened the door for all sorts of ridiculous posts and cross-posts
  104. to alt.drugs, hurrah for the net).
  105.  
  106. 3) I believe it is the mission of academic hackers like John Ousterhout
  107. (hope you don't mind the characterization ;-), rms, the epoch folks, the
  108. postgres folks, the self folks, the mach folks, even little guys like me
  109. (not to put myself in such illustrious company), to raise the level of
  110. the Lowest Common Denominator. By this I mean: if you go buy some random
  111. workstation running foo-ix, what can you expect to find on it without
  112. putting out for "extra" software? Right now, you can expect to find X11
  113. (in some, usually belated form (AIXwindows, DECwindows, etc. etc. Yuck.
  114. I hate it all and generally, if possible, go build myself a vanilla X
  115. installation from scratch and use that instead on whatever machines I
  116. hack on). You can expect to find a C compiler (although this is changing
  117. thanks to the unenlightened policies of Sun, HP and probably others).
  118. You can expect to find some sort of source-level debugger for C
  119. programs. You can expect to find the (2) calls documented in the V7 PM
  120. plus some TCP/IP stuff and other BSD kernel facilities (but this last
  121. bit is not universal). You can expect to find some sub- or super-set of
  122. the (3) calls documented in same. You can expect some sort of csh. You
  123. can expect ed and vi. And baby, that's pretty much it. You cannot expect
  124. a lisp. You cannot expect an RDBMS. You cannot expect emacs/epoch. You
  125. cannot expect any interpreted languages, let alone an object-oriented
  126. one (Xt+C does NOT count and, anyway, you don't always get Xt with your
  127. X, nor a real C compiler). You cannot expect some facility to ease the
  128. building of distributed systems (can you tell this is a big deal for me?
  129. :-). There's NO BLOODY WAY IN HELL you can expect the full source code
  130. to ANYTHING (I was recently reminiscing with a fellow hacker at CMU
  131. about the old lisp hardware environments like the explorer and the
  132. symbolics where you had the source code (in lisp! yay!) to EVERYTHING --
  133. the editor, the OS, the compiler, EVERYTHING. Sigh.). You MIGHT have
  134. some or all of these, but then, you might not. I think that efforts like
  135. tcl/tk, postgres, mach, gcc, the free version of ISIS,  and, yes, BOS
  136. and Self are slowly raising the PERCEPTION of what the LCD *should* be,
  137. if not its actual state. To make it into the widest possible perception
  138. of what the LCD is, something basically has to be so portable,
  139. unencumbered, useful and easy to use that vendors of all colors can't
  140. afford NOT to absorb it somehow. Witness X windows. Witness (god, I
  141. hope) TCP/IP.  Recently, witness GCC, GNU Emacs and other FSF output.
  142. I'm sorry, but I don't see any current implementation of (common) lisp
  143. making a difference this way -- maybe I'm wrong. Again, it is surely
  144. beyond the scope of a note like this to argue the point, but I'd be
  145. happy to if anyone else is interested. There is an excellent tech report
  146. from SEI by PeterFelier that talks about the LCD issue in the context of
  147. CASE tools and vendors, which I highly recomend. I can post the
  148. reference if anyone cares.
  149.  
  150. If I were an FM DJ, I'd be fired for too much talk. So, now back to your
  151. regularly scheduled programming.
  152.  
  153. Cheers,
  154.                 -- Sean
  155. --
  156. Sean Levy, n-dim Group, EDRC, CMU, 5000 Forbes Ave, PGH, PA 15213
  157. Email: snl+@cmu.edu, Phone: +1 412 268 5221, Fax: +1 412 268 5229
  158.