tag:blogger.com,1999:blog-178174920347765771.post9120467841801838459..comments2023-10-30T09:20:21.742-07:00Comments on One Div Zero: When CONSTants VaryJames Iryhttp://www.blogger.com/profile/02835376424060382389noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-178174920347765771.post-53042610322691520452011-12-26T21:57:11.743-08:002011-12-26T21:57:11.743-08:00This is a good overview of the problems with "...This is a good overview of the problems with "const" in C++. I would of course rather see that new languages fix these problems rather than just discarding "const" entirely. I find that "const" is a really helpful feature in code maintenance.Edaqa Mortorayhttp://mortoray.myopenid.com/noreply@blogger.comtag:blogger.com,1999:blog-178174920347765771.post-71473205895708706432010-07-30T21:35:54.272-07:002010-07-30T21:35:54.272-07:00testtestJamesIrynoreply@blogger.comtag:blogger.com,1999:blog-178174920347765771.post-73166652440065833912010-07-22T02:22:36.110-07:002010-07-22T02:22:36.110-07:00This post is desperately lacking some examples fro...This post is desperately lacking some examples from other languages -- this C++ stuff is just boring (for me).Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-178174920347765771.post-46550308517103357382010-07-20T22:04:10.139-07:002010-07-20T22:04:10.139-07:00The problems with const are numerous but seeing th...The problems with const are numerous but seeing this article while I'm migrating to my new favorite language (Scala), I'm pretty blown away by the similarity to Scala's idea of immutability, which every Scala programmer learns on day one doesn't mean an object won't change. Yet we rely on it all the time for the awesome multithreading capabilities that come from functional Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-178174920347765771.post-25693128033781442092010-07-20T15:13:13.831-07:002010-07-20T15:13:13.831-07:00"const" sure has weaknesses, but to me i..."const" sure has weaknesses, but to me it is an original and interesting experiment. What is sad is that no language tried to generalize further the mecanism. The idea of const is to offer to the programmer the possibility to prove things statically on a plane that is totally orthogonal to the (more mundane) rest of type system. Brilliant ! There are the classic data types and classes Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-178174920347765771.post-54657090906316955352010-07-20T14:41:36.278-07:002010-07-20T14:41:36.278-07:00Is it not worth it's documentation function?
...Is it not worth it's documentation function?<br /><br />Even if the compiler can't enforce it in all cases, applying the const modifier documents the intent of maintaining a certain reference's state across a function call.Anonymousnoreply@blogger.com