LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] EU Rejects Patent Software Law - For Now

[ILUG] EU Rejects Patent Software Law - For Now

Brian Brazil bbrazil at netsoc.tcd.ie
Fri Feb 18 11:34:20 GMT 2005


On Fri, Feb 18, 2005 at 11:00:30AM +0000, Colm MacCarthaigh wrote:
> On Fri, Feb 18, 2005 at 11:07:29AM +0000, Bryan O'Donoghue wrote:
> > #define ISNOT(x,y) if(x==y) return 1; else return 0;
> 
> If you're going to post an insane rant, at least try and write code that
> would actually work.
> 
> #define ISNOT(x,y)  ((x) != (y))
> 
> I mean, you've just proved that the implementation of an ISNOT operator
> is not (no pun intended) obvious, and non trivial. Since you managed to
> mess it up this one-liner in quite a few ways.

Sorry, also wrong. The patent spec was 'point to the same location in
memory' - ISNOT isn't NOTEQUAL. Although someone would probably argue
that the patent would also cover the above macro as a trivial extension
(software patents are fun for all the family).

#define ISNOT(x,y) (&(x) != &(y))
or if you want to avoid !=
#define ISNOT(x,y) (&(x) - &(y))

Granted this should never be true in C (unless used as ISNOT(x,x)), but
I think its possible in C++ using references.

Also as we now use 3 operators, we aren't (directly) infringing. On the
other hand - does a macro function count as an operator? Maybe
infringing in the original code, but not after cpp gets to it.

Brian

-- 
Website: http://netsoc.tcd.ie/~bbrazil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 185 bytes
Desc: not available
Url : http://mail.linux.ie/pipermail/ilug/attachments/20050218/48277544/attachment.pgp


More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell