home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / prolog / 1570 < prev    next >
Encoding:
Text File  |  1992-08-20  |  1.1 KB  |  24 lines

  1. Newsgroups: comp.lang.prolog
  2. Path: sparky!uunet!infonode!ingr!capalo!quintus!quintus!jonas
  3. From: jonas@quintus.com (Jonas Almgren)
  4. Subject: Re: SICStus Prolog singleton warnings slow down while consulting a file
  5. Message-ID: <1992Aug19.191546.15336@quintus.com>
  6. Sender: news@quintus.com (USENET news account)
  7. Nntp-Posting-Host: page
  8. Organization: Quintus Corporation
  9. References: <1992Aug17.172126.19111@watson.ibm.com> <MATSC.92Aug17231714@vishnu.sics.se>
  10. Date: Wed, 19 Aug 1992 19:15:46 GMT
  11. Lines: 11
  12.  
  13. It's probably a bad idea to completely switch off singleton warnings.
  14. You'll definitely have to pay a price in uncaught bugs as you keep on
  15. with the development of your program.
  16.  
  17. I'm not sure about SICStus, but in Quintus Prolog, it's enough to
  18. use '_' (underscore) as the first character in the variable name,
  19. and no singleton warning will be given for that variable. Personally,
  20. I think it's good programming style to use such variable names for
  21. singeltons, whenever it isn't clear from the context why the singleton
  22. can be ignored. As Ralf points out, just a '_' doesn't make the code more
  23. readable.
  24.