Path: utzoo!attcan!uunet!mcsun!ukc!mucs!liv-cs!liv!kpurcell From: KPURCELL@LIVERPOOL.AC.UK Newsgroups: comp.sys.mac.misc Subject: Re: NeXT Mach (was Re: UNIX is yuck (was Re: Next intro...) Message-ID: <90301.081741KPURCELL@LIVERPOOL.AC.UK> Date: 28 Oct 90 07:17:41 GMT References: <1990Oct6.172357.18366@smsc.sony.com> <1990Oct8.091751.3053@csc.anu.oz.au> <4b5vB5e00UhBA=gi8V@andrew.cmu.edu> <1990Oct15.224912.26056@eng.umd.edu> <21288@well.sf.ca.us> <1990Oct22.213553.20022@Neon.Stanford.EDU> Organization: University of Liverpool Lines: 55 In article <1990Oct22.213553.20022@Neon.Stanford.EDU>, philip@pescadero.Stanford.EDU (Philip Machanick) says: > >In article <21288@well.sf.ca.us>, loca@well.sf.ca.us (John Hoag) writes: >|> > With Think C or MPW 2.02, it isn't hard at all. >|> >|> ...once you've written a few hundred lines of environment-handling code >|> in preparation for printing "Hello World." >The Mac may be a lot more difficult to program than it needs to be, but let's >stick to the facts. I don't know about Think C or MPW, but this statement >implies that there is no way of writing trivial programs on the Mac. In THINK >Pascal, you can use ordinary ANSI-Pascal IO. Here's your "Hello World" >program: > >program hello; >begin > showtext; > writeln('hello world'); >end. > >(you may want to add a readln to the end to stop the window disappearing until >RETURN is typed). And you _do not_ have to write hundresd of lines to do the >same in a dialog box. Of course, once you get into non-trivial programs, >things >aren't too pretty. >-- >Philip Machanick >philip@pescadero.stanford.edu Strange as it may seem I wrote almost this program this even to see if I could still remeber how to do Pascal I/O on the Mac. Of course I fluffed it and forgot the showtext() call. These macs they force you to do all sorts of unatural things just to get stuff on the screen :-) BTW (the serious bit) some folks have said use MacApp or Think Class Libraries to 'object-orientate' your way around the difficulties with a Mac. Well this doesn't work because you still have to know IM from top to bottom and (in the case of TCL) you have to keep 4 different hierarchies in you head at the same time (I still don't understand that, and I ain't an idiot!). I know OOP ideas are worthwhile, but trying to learn the Mac and a new system of programming at the same time is just too much. The simplest solution I've found is to use TransSkel (and TransEdit and TransDisplay). They take all the donkey work out of building simiple applications, you can write a 20 line application, to do Hello World and it will automatically cope with the Apple menu and DAs and moving windows and ....... You get the drift. Availible for both THINK C and Pascal from indri.primate.wisc.edu. Kevin Purcell | kpurcell@liverpool.ac.uk Surface Science, | Liverpool University | Programming the Macintosh is easy if you understand Liverpool L69 3BX | how the Mac works and hard if you don't. -- Dan Allen