20 Dec
2008
20 Dec
'08
12:09 a.m.
Henning Thielemann <schlepptop@henning-thielemann.de> wrote in article <494AE7A3.3000306@henning-thielemann.de> in gmane.comp.lang.haskell.cafe:
In C/C++ referential transparent functions code can be declared by appending a 'const' to the prototype, right?
No. $ cat x.cc int f() const; int f() { return 3; } $ gcc x.cc x.cc:1: error: non-member function ???int f()??? cannot have cv-qualifier You can define a const member function, but it can call rand() just fine. -- Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig If you want to go somewhere, goto is the best way to get there. Ken Thompson.