Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!usc!apple!marc From: marc@Apple.COM (Mark Dawson) Newsgroups: comp.sys.mac.programmer Subject: Re: Pascal vs. C Message-ID: <40837@apple.Apple.COM> Date: 9 May 90 14:20:35 GMT References: <1690MAYER-A@RICEVM1> Organization: Apple Computer Inc, Cupertino, CA Lines: 61 In article <1690MAYER-A@RICEVM1> MAYER-A@RICEVM1.BITNET (David Mayer) writes: >Hi gang! > >I'm new to Netnews, so I hope this hasn't been discussed >previously. > >I'm a psychologist, not a programmer. But I have done a good >bit of programming, and would like to learn to program >Macintosh applications. I know a little Pascal and no C, but >I suspect that I should learn one of these languages. > >I usually need custom applications which can present graphical >stimuli (hopefully originally composed in a separate graphics >package I already know), record subjects' inputs and make >reaction time measurements. The graphics I need don't have to >be Rodger Rabbit-perfect animations, but I do need to vary >certain aspects dynamically. (I'm going to try to simulate >some control panel displays and gauges). And the reaction >time measures must be reliable. > >Are there any suggestions regarding which language(s) I should >learn. Or any good books I ought to read? I can't find any >information regarding the relative strengths and weaknesses of >these two languages? Does this mean I'm asking the wrong >questions?? > >I would appreciate any ideas or suggestions. Thanks, > Well, to start off with, it somewhat boils down to a "religious" issue--i.e. strongly held personal opionions (though not in the same ballpark as Lisp programmers--they won't even admit to knowing how to spell "Pascal"). I personally use C,C++, and assembly. Pascal is an easier language to learn (I believe it was developed as a teaching language). Many extensions have been made to make it more usefull as a professional programming language. C was developed as a systems programming langauge, giving more support in accessing bits and manipulation of bits in memory. I believe that C allows you to write more elegant and compact code, BUT it also allows you to write code that is very gross and obtuse (its not unusual to take hours to track down a wrongly dereference pointer). If you're dealing with a lot of records within records, Pascal has the lead in readability (the WITH statement's really powerfull). So...I think C is a more powerfull language than Pascal, allowing you to do more in less code. This power comes at a cost, though. C lets you get away with about anything, which means that sometimes it allows you to screw yourself royal. If you're more familiar with Pascal than C, I would only recommend switching to C if you're going to be doing a lot of manipulation of memory. Mark -- --------------------------------- Mark Dawson Service Diagnostic Engineering AppleLink: Dawson.M Apple says what it says; I say what I say. We're different ---------------------------------