home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 7194 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.4 KB

  1. Path: nntp.hut.fi!usenet
  2. From: oahvenla@vesipyssy.cs.hut.fi (Osma Ahvenlampi)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Name spaces (Was Re: Frustrated Jolyon (was Re: E - Just say NO! (was Re: Visual E - New E))
  5. Date: 11 Apr 1996 14:58:20 +0300
  6. Organization: What, me, organised?
  7. Sender: oahvenla@vesipyssy.cs.hut.fi
  8. Distribution: inet
  9. Message-ID: <jdjg2ab6kgz.fsf_-_@vesipyssy.cs.hut.fi>
  10. References: <4k7k0p$4u4@pravda.aa.msen.com> <DpJo8w.HqA@cix.compulink.co.uk>
  11.     <4kgj0e$1ht@irz413.inf.tu-dresden.de>
  12. NNTP-Posting-Host: vesipyssy.cs.hut.fi
  13. Mime-Version: 1.0
  14. Content-Type: text/plain; charset=US-ASCII
  15. In-reply-to: ss37@irz.inf.tu-dresden.de's message of 10 Apr 1996 17:10:06
  16.     +0200
  17. X-Newsreader: Gnus v5.1
  18.  
  19. In article <4kgj0e$1ht@irz413.inf.tu-dresden.de> ss37@irz.inf.tu-dresden.de (Sven Steiniger) writes:
  20. >problems. Besiedes, in C you have to write every function/variable-name in
  21. >the same case. The older standard-functions (like string.h/strchr()) are
  22. >standard lowercase. But if you use newer includes (like for w*nd*ws) you
  23. >often know the function-name but dont know the case of the latters..
  24.  
  25. Uhm, I think you've missed a point.
  26.  
  27. ANSI C and UNIX kernel functions are in lower case. AmigaOS and
  28. Windows have the naming practise of using mixed case with a capital
  29. letter in the beginning of the function, while X (blechh) for example
  30. has a weird mix of mixed case with a lower case letter in the
  31. beginning, and sometimes mixed case with a capital X, etc.
  32.  
  33. The point is to avoid name space clashes. If you use functions with
  34. only lower case, words delimited with _'s, you are sure to avoid using
  35. the name of any ANSI C or AmigaOS function, even if you have no idea
  36. what all the functions available in those libraries are named. This is
  37. not at all a question of "older" and "newer" includes.
  38.  
  39. While it may seem a good idea for a language to give stricter, and
  40. enforced, rules of naming, it will also mean that the language will
  41. make the name space much smaller than it could be, and some library
  42. functions, written with languages that do not restrict naming, will be
  43. permanently out of reach. This is a tradeoff between compatibility
  44. through flexibility, and more certain third party code legibility.
  45.  
  46. -- 
  47. An idea is not responsible for the people who believe in it.
  48. | "Osma Ahvenlampi" <mailto:oa@iki.fi> <http://www.iki.fi/oa/> |
  49. | Amiga&BeBox&ClassAct&Voodoo&ARTech cool stuff: I-Net225&AWeb |
  50.                                                               --
  51.