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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f43e6,ea99940253996e3e X-Google-Attributes: gidf43e6,public X-Google-Thread: 109fba,ea99940253996e3e X-Google-Attributes: gid109fba,public X-Google-Thread: 108717,ea99940253996e3e X-Google-Attributes: gid108717,public X-Google-Thread: 103376,ea99940253996e3e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-03 15:54:12 PST From: Peter Ammon Newsgroups: comp.software-eng,comp.programming,comp.lang.c++,comp.lang.ada Subject: Re: ISO Studies of underscores vs MixedCase in Ada or C++ Date: Fri, 03 Oct 2003 15:42:20 -0700 Organization: Apple Computer, Inc. Message-ID: References: <2cfd1a4e.0309252032.3e3c0a1a@posting.google.com> <3F7C37C3.B5469C33@Sonnack.com> NNTP-Posting-Host: pammon.apple.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.apple.com 1065220947 26396 17.201.23.72 (3 Oct 2003 22:42:27 GMT) X-Complaints-To: abuse@news.apple.com NNTP-Posting-Date: Fri, 3 Oct 2003 22:42:27 +0000 (UTC) User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5b) Gecko/20030913 Thunderbird/0.3a X-Accept-Language: en-us, en In-Reply-To: <3F7C37C3.B5469C33@Sonnack.com> Path: archiver1.google.com!news2.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.mathworks.com!news.kjsl.com!news.spies.com!forum.apple.com!news.apple.com!not-for-mail Xref: archiver1.google.com comp.software-eng:34 comp.programming:325 comp.lang.c++:685 comp.lang.ada:179 Date: 2003-10-03T15:42:20-07:00 List-Id: Programmer Dude wrote: > Peter Ammon wrote: > > >>classmethod : >>access_specifier method_type_specifier method_return_type_specifier >>method_declaration method_body >> >>Can you quickly count which is the fourth? >>Compare to >> >>classmethod : >>accessSpecifier methodTypeSpecifier methodReturnTypeSpecifier >>methodDeclaration methodBody > > > Compare to > > classmethod : > access_specifier > method_type_specifier > method_return_type_specifier > method_declaration > method_body You've piqued my interest, since I'm the first to admit that my grammar specifications are hard to read. Where do you put the action in the above code? classmethod : access_specifier method_type_specifier method_return_type_specifier method_declaration method_body { doSomething(); } What if there's more than one reduction possible? classmethod : access_specifier method_type_specifier method_return_type_specifier method_declaration method_body { doSomething(); } | something_else another_thing even_more blah_blah { doSomethingElse(); } This looks like it's getting hard to read. > > Or my preference if the tool allows > > classmethod : > access-specifier > method-type-specifier > method-return-type-specifier > method-declaration > method-body > > (In proportional fonts, hyphens are usually skinnier than > underscores and (to my eye) make the text more readable. > It's not as noticable with monospace fonts, but I think the > lower example looks better (read: more readable :-).) Agreed! I wish that more languages allowed hyphen use in identifiers. Dylan is the only one I can think of off the top of my head. -Peter