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=0.6 required=5.0 tests=BAYES_20,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,808505c9db7d5613 X-Google-Attributes: gid103376,public From: james@sandy.mcci-arl-va.com (Scott James) Subject: Capitalization Entropy (was: Looking for good Ada95 book) Date: 1996/11/14 Message-ID: <56dodr$alf@client3.news.psi.net>#1/1 X-Deja-AN: 196331242 references: <32723F6A.54A3@dtek.chalmers.se> <199611111501281395400@dialup81-4-2.swipnet.se> <199611121842172247819@dialup110-1-9.swipnet.se> organization: MCCI, Arlington VA newsgroups: comp.lang.ada Date: 1996-11-14T00:00:00+00:00 List-Id: I do hate to introduce mere technical (sort of) details into this political discussion on capitalization but it is interesting (to me at least) that a subset of these different styles can be analyzed from an information point of view. For my measure of information, I use *intended* capitalization. The three styles in question, summarized by Lars are: (1) all_lower_case_identifiers (with intended capitalization) (2) Mixed_Case_Identifiers (with intended capitalization) (3) ALL_UPPER_CASE (well... you get the idea) The claim is that case (1) contains the most information according to the intended capitalization metric. Examples of this have already been given in this very thread but I will summarize quickly with an example: (1) this_is_an_IO_package_I_got_from_Fred (2) This_Is_An_IO_Package_I_Got_From_Fred (3) THIS_IS_AN_IO_PACKAGE_I_GOT_FROM_FRED This has consequences when converting between the styles. Assume the obvious (simplest) conversion programs between (1),(2),(3). Going from (3) --> (?) --> (3) we arrive at the same data. Going from (2) --> (1) --> (2) we arrive at the same data. Going from (2) --> (3) --> (2) we lose the capitalization of "IO" Going from (1) --> (2) --> (1) we lose the capitalization of "I" and "Fred" Going from (1) --> (3) --> (1) we lose the capitalization of "I","IO","Fred" Thus, these styles are well ordered according to capitalization entropy (any Comp Sci looking for a Master's Thesis? You can borrow my phrase, ... just kidding ... I hope), that is, one may convert without losing information in only one direction. But while we are on the topic of politics :-) ... begin Lars: ... Different scopes. Organization and every user. When I say "allow different styles", I mean the larger scope. One project / organization / person should not impose its own preferred style on other unrelated organizations / persons. I do not mean that you should accept anything within a project / organization. end Lars: This quite hits the nail on the head as it were. The point being really whether this whole thread has been about: (a) it's good to have in house discipline and accept conventions (b) it's good that *all* Ada programmers follow the Mixed_Cap convention. Personally, I can't agree with (a) more, but (b) seems a bit hard to swallow (for entropic and readabily issues). I thus wonder how many others out there are a bit leary when they see: begin Dewar: My point is that we might as well all get used to the same style, and luckily, as I see from a very large sample of Ada 95 users, the great majority DO use a single style. In my opinion, those in the minority should change -- I did! end Dewar: Incidentally, is it my imagination or was there a dissenting capitalization opinion in the Ada83 style guide? I seem to have misplaced mine and now only have Ada95 style guides.