Henning Thielemann <schlepp...@henning-thielemann.de> wrote in article 
<494ae7a3.3000...@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.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to