From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ad988eb0a9545c86 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-20 16:03:29 PST Newsgroups: comp.lang.ada Path: newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.edgix.com!uunet!ash.uu.net!world!bobduff From: Robert A Duff Subject: Re: Problem trying to implement generics. Sender: bobduff@world.std.com (Robert A Duff) Message-ID: Date: Fri, 20 Apr 2001 23:02:57 GMT References: <9b6m27$68e$1@taliesin.netcom.net.uk> <0JBB6.10484$FD1.1197250@news6-win.server.ntlworld.com> <9b7tce$laf$2@taliesin.netcom.net.uk> <3ADC4320.7ACA3DEC@averstar.com> <9bhoup$h9k$1@taliesin.netcom.net.uk> <3ADC7A79.8E853905@mindspring.com> <9bi7vb$9j7$1@taliesin.netcom.net.uk> <9bpacv$86n$2@a1-hrz.uni-duisburg.de> Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.3/Emacs 19.34 Xref: newsfeed.google.com comp.lang.ada:6824 Date: 2001-04-20T23:02:57+00:00 List-Id: Brian Rogoff writes: > Well, the whole thing is somewhat whimsical. I personally prefer this > aspect of Ada syntax but it's very, very low on my list, so if I were > voting on some new language design I'd probably vote to keep begin-end > but if the rest of the world wants {} instead so be it. I agree that it's not the most important thing. One thing I've considered is having two alternate syntaxes for the various control structures. For example, you could say: if Condition then ... end if; or if Condition { ... }; or something like that. The former would be used when "..." is long; the latter when "..." is short (eg three lines or less?) -- so short that the "}" is close to the "if", so it's obvious what it belongs to, so "end if" is merely clutter in that case. And probably the {...} syntax couldn't have other control structures nested inside it -- it's only allowed for the innermost thing. Good idea? Oh, and I'd like my editor to automatically convert from one to the other as "..." grows or shrinks. > I'd really like to use the {} for something else, and there are only a few > symmetric bracket pairs to choose from. What did you have in mind? Literals of type "set"? Note that you can invent new bracket-y pairs using some slightly ugly syntax like: (. .) (: :) (* *) -- Pascal uses this one. << >> -- Ada uses this one. `` '' -- The TeX "programming" language uses this. ;-) BTW, I wish ASCII had left and right double-quote characters. That would be much more civilized. - Bob