delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/17/04:43:06

Date: Wed, 17 Dec 1997 11:41:21 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Hans 'the Beez' Bezemer" <hansoft AT visitweb DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Scripting language library
In-Reply-To: <34962190.1704432@news.xs4all.nl>
Message-ID: <Pine.SUN.3.91.971217114055.28294A-100000@is>
MIME-Version: 1.0

On Tue, 16 Dec 1997, Hans 'the Beez' Bezemer wrote:

> > All you are doing is polluting the macro namespace. If some header
> > file uses 'begin' or 'end' for any purpose, it will break. Macros
> > should not be used frivolously.
>
> It has it's own header file, called easyc.h
> 
> >	static char *fill(char *beg, char *end);	/* oops */
>
> After tens of compilers and platforms I've never encountered the problem.
> "token", yes. "begin", never.

I won't get into the C/Pascal controversy.  However, usage of simple
words like `begin' and `end' as macros is indeed bad idea if the
macros are defined in a header that should be included by other
programs.

In general, macro names should not be usurped by libraries, unless
they begin with an underscore, like in __DJGPP__ or __MSDOS__.  ANSI C
says that any other name is free to be used by applications, and a
good library should not get in the way of applications.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019