Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!wiml From: wiml@milton.u.washington.edu (William Lewis) Newsgroups: comp.sys.next Subject: Re: Procedural + Objective mixing Message-ID: <14036@milton.u.washington.edu> Date: 9 Jan 91 07:10:52 GMT References: Organization: University of Washington, Seattle Lines: 27 In article aberno@questor.wimsey.bc.ca (Anthony Berno) writes: >The question is this: Is it a bad idea to "mix" >procedurally based C code with objective-C? I have little experience >(so far) with object oriented languages and am just starting to learn >Objective-C. I see one of three answers here: > >1) Absolutely not. The machine will do horrible unpredictable things and >crash. (Unlikely) >2) It works as expected, but is bad program design. Debugging is more >difficult, and it is harder to trace program execution. >3) No problem, do it as much as you like. Well, the answer is certainly not #1. I don't think that it's a bad idea program-design-wise to mix them, but that's a matter of interpretation. (On the other hand, there are situations where you *must* mix them -- using shellsort() or quicksort(), say, or supplying a callback routine for many of the DPS and soundkit routines.) Gdb treats method calls just like function calls when you're debugging. It's probably far better to mix your metaphors than to try to cram a program into a paradigm which doesn't fit it ... -- wiml@milton.acs.washington.edu Seattle, Washington (William Lewis) | 47 41' 15" N 122 42' 58" W "These 2 cents will cost the net thousands upon thousands of dollars to send everywhere. Are you sure you want to do this?"