scope of header files

John Meacham john at repetae.net
Mon Mar 17 11:46:48 EDT 2008


On Sat, Mar 15, 2008 at 12:56:33PM +0000, Ross Paterson wrote:
> Because the Ptr type doesn't indicate const-ness (perhaps it should).

Even many of the C people think adding const to the language was a bad
idea.. for instance, is strchr(3)

const char *strchr(const char *s, int c); 
or
char *strchr(char *s, int c); 
? 

both are useful, the C standard split the different and went with the
equally incorrect

char *strchr(const char *s, int c); 


In any case, 'const' is defined to not affect the calling convention at
all for a function (in C, I am not sure if this is the case in C++) so
there is no need to worry about it for the haskell FFI spec.

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the Glasgow-haskell-users mailing list