Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As someone who has deliberately avoided C++ for the last 20 years (in favour of functional programming) I find the discussions of "reference semantics" and "value semantics" (let alone "mutable value semantics") to be quite opaque. It is as if the C++ community has become an enclave of folks who put up with the extreme complexity of C++ and speak a correspondingly tortuous theoretical language.

What the seem to be saying here is that the "subscripting" operation returns a view into its argument, not entirely unlike the concept of a lens. The only thing that view can be used for is directly accessing the the part of the value that is in focus—the view is not itself a first class value, which means that so-called "reference semantics" don't come into the picture.

I don't think they're being evasive or promoting their idea in bad faith. They are just operating in a characteristically arcane way for C++ language design people.

The following blog post helped me start to grasp what this aspect of C++ talk is actually about: https://akrzemi1.wordpress.com/2012/02/03/value-semantics/



Here's an example of how C++ terminology gets developed, from Stroustrup's own website: https://www.stroustrup.com/terminology.pdf

To me, this seems like a proliferation of distinctions and enthusiastic theorizing. Finding solutions which actually simplify the task of programming and/or clarify matters seems a long way from this attitude.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: