Path: utzoo!mnetor!uunet!mcvax!guido From: guido@cwi.nl (Guido van Rossum) Newsgroups: comp.sys.mac.programmer Subject: Re: Goin' Crazy on a Mac, or, How I Love MPW "GlobalData" Message-ID: <306@piring.cwi.nl> Date: 8 May 88 11:32:44 GMT References: <8816@eleazar.Dartmouth.EDU> <7327@drutx.ATT.COM> <23952@ucbvax.BERKELEY.EDU> Reply-To: guido@cwi.nl (Guido van Rossum) Organization: The Royal Society for Prevention of Cruelty to Amoebae Lines: 23 In article <23952@ucbvax.BERKELEY.EDU> oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) writes: >In article <7327@drutx.ATT.COM> clive@drutx.ATT.COM (Clive Steward) writes: >>for this. In particular, the very useful program generators yacc and >>lex generate data arrays, which are used for finite state machines. > >So, write the data arrays to a resource using a tool. [...] >Sure it is a pain that the compiler didn't do it for you, >but when the workaround takes one line, why bitch? Aren't we exaggerating a bit, Mr. Oster? The generators mentioned produce their output as C code (mostly data initializations), so how do you suggest we create the resource in the first place? It has to be run through a compiler at some point... Sure, the code generated is simple in structure so we could scan it by other means, but then it's no longer a one-liner, is it? The real problem here is not to get data loaded into your program (your trick dies just fine) but to translate a *large* initialized data statement into bits. -- Guido van Rossum, Centre for Mathematics and Computer Science (CWI), Amsterdam guido@piring.cwi.nl or mcvax!piring!guido or guido%piring.cwi.nl@uunet.uu.net