|
|
|
|
|
by Negitivefrags
4609 days ago
|
|
With regard to declaring the lack of side effects in an interface, I'd just like to mention that C++ is very nice in this regard too, and I think it's an important feature of C++ that is often overlooked. Yes, it's true that with casting and so on you are not actually ensuring anything when you declare a function const like you are with Haskell, but you announce to other programmers who will use your code that: 1) There will be no observable state changes 2) That the function is thread safe This is a very useful thing for a language to support in it's function declarations, and other languages could do well to learn from that. |
|