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-Thread: 103376,f890526de6a8a218 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!newscon02.news.prodigy.com!prodigy.net!newsfeed.telusplanet.net!newsfeed.telus.net!clgrps13.POSTED!53ab2750!not-for-mail Sender: blaak@BLIGHT Newsgroups: comp.lang.ada Subject: Re: How to detect OS type and version? References: <20051013115001.60b6a695@pscube.informatik.uni-stuttgart.de> From: Ray Blaak Message-ID: Organization: The Transcend X-Newsreader: Gnus v5.7/Emacs 20.7 Date: Sun, 16 Oct 2005 00:13:12 GMT NNTP-Posting-Host: 66.183.127.198 X-Trace: clgrps13 1129421592 66.183.127.198 (Sat, 15 Oct 2005 18:13:12 MDT) NNTP-Posting-Date: Sat, 15 Oct 2005 18:13:12 MDT Xref: g2news1.google.com comp.lang.ada:5711 Date: 2005-10-16T00:13:12+00:00 List-Id: "Jeffrey R. Carter" writes: > Stefan Bellon wrote: > > return "GNU/Linux"; > > Is there some reason you're using String rather than an enumerated type? I submit that an enumerated type is the wrong thing to do. Operating systems are not fixed, can have many sub-variants. (WinOS, Win2000, WinNT, etc.). Simply adding a new OS to some central definition should not impact all existing code. In practical terms people should have had an "unknown OS" handler anyway. It's akin to having some app that processes first names as enumerated values instead of strings. It's a mistake because the set of values are open ended and are not known in advance, and can change depending on where you execute. -- Cheers, The Rhythm is around me, The Rhythm has control. Ray Blaak The Rhythm is inside me, rAYblaaK@STRIPCAPStelus.net The Rhythm has my soul.