Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucsd!usc!randvax!salzman From: salzman@randvax.UUCP (Isaac Salzman) Newsgroups: comp.sys.mac.programmer Subject: Re: ThinkSpeed C++-------- Message-ID: <2195@randvax.UUCP> Date: 14 Sep 89 06:45:31 GMT References: <336@castle.ed.ac.uk> <13519@well.UUCP> <6494@columbia.edu> Reply-To: salzman@rand.ORG (Isaac Salzman) Organization: RAND Corp., Santa Monica, Ca. Lines: 82 In article <6494@columbia.edu> kearns@cs.columbia.edu writes: >I am very disappointed with Lightspeed's Pseudo object oriented >extensions. I have used C++ heavily; it is a great language which >is certainly going to be the next standard. LSC 4.0 is an >unfortunate detour along the way. > >An indepth discussion pointing out the failings of LSC's object system >would require much space and effort. Suffice to say that it is a kludge >compared to the elegance and thought put into C++. I fear that >Think has sentenced themselves to supporting a kludgy variant of >C for years to come, even after they eventually support C++, which >is inevitable. i don't believe i'm reading this. C++ is a great language? how many other OOPL's have you used? granted, C++ may very well become "a standard" of sorts (though no programming language has ever, or will ever be deemed the "standard" programming language), but it is surely not because it is great, ellegant, etc. "elegance and thought put into C++"??!! hah!! C++ has to be one of the biggest kludges that exists!!!! it was designed to be a superset of C with classes and inheritance, while still allowing you to do things like messing with pointers and all sorts of type casting that takes away from being truly object oriented. and it's added additional complexity on top of that, and even more ways to hang yourself -- like introducing reference parameters. if you want to use a good clean, simple OOPL, one that really does implement the paradigm properly, look at Eiffel. but I do use C++ -- because it's more available right now for me on more platforms (we are getting Eiffel though for our Sun's), and i like writing obscure code (hey, i'm a C programmer, what can I say :-) and it's fast (GNU C++ on a sparcstation). but I don't use it because it's a great language. far from it. how can you get on THINK C for making what I consider to be a very worthy attempt at bringing OOP to the Mac for C programmers. they've managed to keep things simple and have added just enough to implement some of the important features of C++ (or any OOPL). as far as I'm concerned, THINK C objects are much closer to what C++ should've been, and if you want a comletely OOP langague, write one from scratch. i'm not going to sit around and wait another 6 mo's for APDA to get MPW C++ out there, and to get MacApp headers for C++ another 6 mo's after that. i want to do OOP on my Mac now! >The bottom line is: no serious developer should write code that uses the >new Think C 4.0 object oriented extensions. The resulting code will not >be portable across platforms, and the code will probably be rewritten for >C++ someday anyway. that's a crock. you just lack creativity! :-) i've written a set of macros which i've been using to develop what will be a very serious chunk of code -- that allow me to compile the UN-MODIFIED source in both C++ and THINK C 4.0. so far it's been an extremely successful venture. while i have to constrain myself a little to make up for the lack of function overloading in THINK C (and other minor language differences), the gains far exceed the losses. i just keep my source code out on one of our Sun file servers, mount it on my Mac with Appleshare/AUFS -- and compile it concurrently on both systems with g++ and THINK C. both executables produce the exact same output. and it's no micky mouse piece of code either -- it fully excercizes the inheritance mechanisms and the dynamic binding (virtual functions and such -- everything being virtual in THINK C, which really should've been the case in C++). if anyone's interested, i'd be more than happy to send you a copy of the macros -- or post them to this newsgroup. but no real magic going on here. you'll look at them and realize that it's altogether pretty trivial and that anyone could write this stuff -- a 50 line .h file, that's it. of course an example program and a bit of documentation would be included. it can probably use a little refinement as well.... so hey, if you don't like THINK C, no one's forcing you to use it! just write C code if you want to be portable. or write some macros and write C++ and THINK C compatable code. or use my macros, but you'll probably tell me they're kludgy, so you'll probably want to write your own. and if you're *seriously* interested in OOP, check out Eiffel. -- * Isaac J. Salzman ---- * The RAND Corporation - Information Sciences Dept. /o o/ / * 1700 Main St., PO Box 2138, Santa Monica, CA 90406-2138 | v | | * AT&T : +1 213-393-0411 x6421 or x7923 (ISL lab) _| |_/ * Internet: salzman@rand.org / | | * UUCP : !uunet!rand.org!salzman | | | "Object Oriented Programming: Programs With Class!"