Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!ncar!midway!mimsy!haven!ncifcrf!lhc!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.sys.apple2 Subject: Re: HLLs vs Assembly Message-ID: <15910@smoke.brl.mil> Date: 20 Apr 91 20:19:56 GMT References: <9104181707.AA29942@beaver.cs.washington.edu> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 22 In article <9104181707.AA29942@beaver.cs.washington.edu> davewh@microsoft.UUCP writes: >{ > struct foo TheNewFoo; > return &TheNewFoo; >} >Do you know why this will FAIL? Sure, but it is not necessary to understand code generation to avoid that pitfall. The relevant knowledge concerns the concept of the lifetime of an instance of an automatic variable, which can be dealt with on a purely abstract (HLL) level. A more detailed understanding of one possible method of implementation might help one better appreciate why the language has such a restriction; however, if you simply are careful to obey the language rules you will avoid such problems. I agree with the general sentiment that a well-rounded background in practical aspects of computing can be helpful in making better use of computers. I haven't been arguing against exposure to machine architecture or assembly language. What I have been arguing against is that assembly language should be the language of choice for any significant fraction of computing application implementations.