Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!ksand@apple.com From: ksand@apple.com (Kent Sandvik) Newsgroups: comp.sys.mac.programmer Subject: Re: MPW and Think Message-ID: <14290@goofy.Apple.COM> Date: 27 Jun 91 23:13:31 GMT References: <1991Jun23.014722.20288@gn.ecn.purdue.edu> <3764@charon.cwi.nl> <1991Jun25.161605.16017@ux1.cso.uiuc.edu> Sender: usenet@Apple.COM Organization: Apple Lines: 25 In article <1991Jun25.161605.16017@ux1.cso.uiuc.edu>, dorner@pequod.cso.uiuc.edu (Steve Dorner) writes: > > In article <3764@charon.cwi.nl> guido@cwi.nl (Guido van Rossum) writes: > >then the messy hacks needed to add segmentation to the code :-( > > Messy hacks? I dunno what's messy about: > > #pragma segment MySegName > > In fact, MPW's segmentation scheme is one of the things that I really like > about MPW compared to THINK, since it allows you to put functions from more > than one segment in a single source file. I don't always WANT my functions > grouped by segment; sometimes, even often, other arrangements make more sense. > > Perhaps this is one of the things that has changed since Guido bought his > copy of MPW. Nih!, it has not changed. Actually clever segmentation tries to group functions/methods calling each other into the same segment (in order to avoid segment loader table entries and segment loading), so either one has to move code between files (as in Think C), or then to just specify pragma statements (as in MPW C). Someone please correct me if there's a neat hack in Think C in order to avoid file structure changes just for the sake of segmentation. Kent Sandvik