Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!ames!amelia!eos!shelby!neon!Kermit.Stanford.EDU!philip From: philip@Kermit.Stanford.EDU (Philip Machanick) Newsgroups: comp.sys.mac.programmer Subject: Re: Pascal vs. C Message-ID: <1990May9.180821.9886@Neon.Stanford.EDU> Date: 9 May 90 18:08:21 GMT References: <40837@apple.Apple.COM> <1690MAYER-A@RICEVM1> Sender: news@Neon.Stanford.EDU (USENET News System) Reply-To: philip@pescadero.stanford.edu Organization: Computer Science Department, Stanford University Lines: 39 In article <40837@apple.Apple.COM>, marc@Apple.COM (Mark Dawson) writes: > In article <1690MAYER-A@RICEVM1> MAYER-A@RICEVM1.BITNET (David Mayer) writes: > >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 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. Another point: the Mac toolbox was originally designed to be called from Pascal, and C programmers occasionally get tripped up by variations in calling conventions and the way strings are stored. Philip Machanick philip@pescadero.stanford.edu