Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!ll-xn!adelie!mirror!cca!g-rh From: g-rh@cca.CCA.COM (Richard Harter) Newsgroups: comp.lang.c Subject: Re: The D Programming Language Message-ID: <24935@cca.CCA.COM> Date: 25 Feb 88 09:35:33 GMT References: <11702@brl-adm.ARPA> <243@eagle_snax.UUCP> <2245@geac.UUCP> <2718@mmintl.UUCP> <2327@umd5.umd.edu> <2731@mmintl.UUCP> Reply-To: g-rh@CCA.CCA.COM.UUCP (Richard Harter) Organization: Computer Corp. of America, Cambridge, MA Lines: 38 Summary: Another modest proposal In article <2731@mmintl.UUCP> franka@mmintl.UUCP (Frank Adams) writes: >In article <2327@umd5.umd.edu> chris@trantor.umd.edu (Chris Torek) writes: > >|[may prefer 'endif' to 'end', but has doubts] > >I debated whether to put in 'endif', etc., or 'end' in the above, and >finally opted for the shorter form. Ask me on another day and you might get >a different answer. Here is an alternative to endif et al. Use labels to start blocks and 'end labels' to end them. For example, if (boolean expression) foo: .... end foo else bar: .... end bar This may look odd, but it does have the advantage that it makes the block delimiting explicit. One would also need to be able to use unlabelled blocks (in macros, for example), so if (boolean expression) .... end else .... end would also fly. A disadvantage (from some viewpoints) is that, since labels now delimit control blocks, they can't be used for goto's. Sometimes, I think this might be a good idea. -- In the fields of Hell where the grass grows high Are the graves of dreams allowed to die. Richard Harter, SMDS Inc.