Path: utzoo!utgpu!water!watmath!clyde!rutgers!cmcl2!brl-adm!umd5!purdue!gatech!mcnc!rti!sas!bts From: bts@sas.UUCP (Brian T. Schellenberger) Newsgroups: comp.lang.c Subject: Re: The D Programming Language (was: Still more new operators) Message-ID: <338@sas.UUCP> Date: 19 Feb 88 05:59:50 GMT References: <11702@brl-adm.ARPA> <558@naucse.UUCP> <2523@haddock.ISC.COM> <563@naucse.UUCP> Reply-To: bts@sas.UUCP (Brian T. Schellenberger) Organization: SAS Institute Inc Cary, NC Lines: 28 |> In article <558@naucse.UUCP> rrr@naucse.UUCP (Bob Rose ) writes: |> >But wait, we can do better [than the proposed ",,"]. ... |> > i(x1, x2, x3, ..., xn) |> >[where 1 <= i <= n; the result is xi] |> ... If `i' is allowed to be an arbitrary integral Actually, there is a much more natural and powerful way to handle this in D: one of the nicer things about C is the way you can get letters out of strings by doing things like: "abcdefghijklmnopqrstuvwxyz"[letter] Why not extend this and allow in-line arrays? This would allow the "choose" operator to work as, for example: array int {x1, x2, x3, ...}[i] This of course means that "abc" is exactly the same as array char {'a', 'b', 'c', '\0'} . . . just another silly idea. -- --Brian. (Brian T. Schellenberger) ...!mcnc!rti!sas!bts DISCLAIMER: Whereas Brian Schellenberger (hereinafter "the party of the first