Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!deccrl!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!mucs!m1!bevan From: bevan@cs.man.ac.uk (Stephen J Bevan) Newsgroups: comp.lang.scheme Subject: Logical operations on integers. Message-ID: Date: 5 Apr 91 08:21:19 GMT Sender: news@cs.man.ac.uk Distribution: comp Organization: Department of Computer Science, University of Manchester Lines: 31 To provide a reasonably portable implementation of Icon like character sets in Scheme I need the equivalent of CommonLisp's logical operations on integers i.e. logand, logior ... etc. As these sort of operations are not in Scheme, I'm going to add them to the Scheme I use. In an effort to maintain some sort of compatibility, I'd like to use the same name as any existing extensions. So, if these sorts of operations are in some Scheme implementations (e.g. T, CScheme, Chez, Mac ... etc.), what are they called? Regarding portability :- Shouldn't logical operations of this sort be included in a standard? Not necessarily in the base language, but perhaps something along the lines of ``if logical operations are provided they should be called X, Y, Z and they should do P, Q, R when applied to integers'' Note I don't advocate adding everything to the language (I know where Common Lisp is if I want it), but rather adding features that are difficult to or cannot be implemented using other Scheme primitives. For example I would like Icon like Csets. However, I don't advocate adding them to the language, as I can implement them as vectors of integers using logical operations on the integers. I would guess there are other things that could benefit from this sort of definition (not that I can think of any at the moment) thanks Stephen J. Bevan bevan@cs.man.ac.uk