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 X-Google-Thread: 10ad19,23963231b5359f74 X-Google-Attributes: gid10ad19,public X-Google-Thread: 10a146,23963231b5359f74 X-Google-Attributes: gid10a146,public X-Google-Thread: 101deb,23963231b5359f74 X-Google-Attributes: gid101deb,public X-Google-Thread: 103376,23963231b5359f74 X-Google-Attributes: gid103376,public X-Google-Thread: 107a89,23963231b5359f74 X-Google-Attributes: gid107a89,public X-Google-Thread: 1073c2,23963231b5359f74 X-Google-Attributes: gid1073c2,public X-Google-Thread: 11440e,23963231b5359f74 X-Google-Attributes: gid11440e,public X-Google-ArrivalTime: 2001-06-01 16:06:20 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!enews.sgi.com!newscon06.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!not-for-mail From: 00001111 <00001111@my-deja.net> Newsgroups: comp.lang.ruby,comp.lang.ada,comp.lang.awk,comp.lang.clarion,comp.lang.java.programmer,comp.lang.pl1,comp.lang.vrml Subject: Re: Long names are doom ? Date: Fri, 01 Jun 2001 16:11:33 -0700 Organization: . Message-ID: <3B182125.FAC55142@my-deja.net> References: <3B0DBD4A.82943473@my-deja.net> NNTP-Posting-Host: a010-0244.skt3.splitrock.net Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: newssvr06-en0.news.prodigy.com 991436722 5762661 209.253.224.244 (1 Jun 2001 23:05:22 GMT) X-Complaints-To: abuse@prodigy.net NNTP-Posting-Date: Fri, 1 Jun 2001 23:05:22 +0000 (UTC) X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ruby:10327 comp.lang.ada:8001 comp.lang.awk:2689 comp.lang.clarion:20848 comp.lang.java.programmer:72857 comp.lang.pl1:706 comp.lang.vrml:3427 Date: 2001-06-01T16:11:33-07:00 List-Id: 00001111 wrote: > Hi All, > > Anybody use variables/names longer than 31 character > and finds it really useful ? >I have folks here in comp.lang.fortran who will die claiming that they > > - "never seen a well written, legible program > that uses any identifiers longer than 18-20 characters..". > - "long variables names are *hard* to read. And, you have to > read though all the characters of every instance of them...". > - "it degrades the legibility of a program to use identifiers that > can't be easily remembered...." Christian Brolin (comp.lang.functional) wrote the program which abbreviates identifiers. In fact if you look deeply you start to smile. This definitely is not human respond on these 3 initial claims but Computer's one where even 'cyber brain' laughs full of irony. Christian Brolin (comp.lang.functional) wrote: > > I have a program that can abbreviate names, e.g.: > > [(len,abbreviate len "Anybody_use_names_longer_than_31_characters") > | len <- [43,42..10]]; > [(43, "Anybody_use_names_longer_than_31_characters"), > (42, "Anybody_use_names_longer_than_31_charactrs"), > (41, "Anybody_use_names_longer_than_31_charctrs"), > (40, "Anybody_use_names_longer_than_31_chrctrs"), > (39, "Anybody_use_names_longer_thn_31_chrctrs"), > (38, "Anybody_use_names_longr_thn_31_chrctrs"), > (37, "Anybody_use_names_lngr_thn_31_chrctrs"), > (36, "Anybody_use_nams_lngr_thn_31_chrctrs"), > (35, "Anybody_use_nms_lngr_thn_31_chrctrs"), > (34, "Anybdy_use_nms_lngr_thn_31_chrctrs"), > (33, "Anbdy_use_nms_lngr_thn_31_chrctrs"), > (32, "Anbdy_us_nms_lngr_thn_31_chrctrs"), > (31, "Anbd_us_nms_lngr_thn_31_chrctrs"), > (30, "Anbd_us_nms_lngr_thn_31chrctrs"), > (29, "Anbd_us_nms_lngr_thn31chrctrs"), > (28, "Anbd_us_nms_lngrthn31chrctrs"), > (27, "Anbd_us_nmslngrthn31chrctrs"), > (26, "Anbd_usnmslngrthn31chrctrs"), > (25, "Anbdusnmslngrthn31chrctrs"), > (24, "Anbdusnmslngrthn31chrctr"), > (23, "Anbdusnmslngrthn31chrct"), > (22, "Anbdusnmslngrthn31chrc"), > (21, "Anbdusnmslngrthn31chr"), > (20, "Anbdusnmslngrthn31ch"), > (19, "Anbdusnmslngrthn31c"), > (18, "Anbdusnmslngrthn31"), > (17, "Anbdusnmslngrthn3"), > (16, "Anbdusnmslngrthn"), > (15, "Anbdusnmslngrth"), > (14, "Anbdusnmslngrt"), > (13, "Anbdusnmslngr"), > (12, "Anbdusnmslng"), > (11, "Anbdusnmsln"), > (10, "Anbdusnmsl") > > Continuing little bit (9,...) (8,...) (7,...) (6,...) (5,...) (4,...) (3,...) (2,An) (1,A) (0, ERROR: FORTRAN NAME IS TOO SHORT. CHOOSE IT BETWEEN 1 and 6 CHARACTERS. STOP. END) Bravo Christian ! That's just real Classics! Christian Brolin (comp.lang.functional) wrote: > > > > > > > > Code: > > abbreviate :: Int -> String -> String > abbreviate maxlen > = truncate > . reverse > . remove wordSeparators > . remove allButFirstVowels > . remove adjacentDuplicates > . remove vowelsEmbeddedInConsonants > . reverse > where > isVowel c = elem c "aeiouy" > isConsonant c = isAlpha c && not (isVowel c) > remove rule name = remove' (length name) rule name > remove' _ _ [] = [] > remove' len rule name > | len > maxlen = let (keep,del,test) = rule name > in keep ++ remove' (len - del) rule test > | otherwise = name > vowelsEmbeddedInConsonants (f:e:d:rest) > | isConsonant d && isVowel e && isConsonant f = ([f],1,d:rest) > | otherwise = ([f],0,e:d:rest) > vowelsEmbeddedInConsonants name = (name,0,[]) > adjacentDuplicates (e:d:rest) > | d==e = ([],1,d:rest) > | otherwise = ([e],0,d:rest) > adjacentDuplicates name = (name,0,[]) > allButFirstVowels (e:d:rest) > | isAlpha d && isVowel e = ([],1,d:rest) > | otherwise = ([e],0,d:rest) > allButFirstVowels name = (name,0,[]) > wordSeparators (u:rest) > | u=='_' = ([],1,rest) > | otherwise = ([u],0,rest) > wordSeparators name = (name,0,[]) > truncate = take maxlen > > -- > Christian Brolin -> Det �r fult att peka > Then please respond why, where, when.