the `Ref` type or the single-valued `Array{T,0}` provides this ability for
Julia.On Fri, Oct 2, 2015 at 5:10 PM Carlo Lucibello <[email protected]> wrote: > Hi julians, > I'd like to emulate the following behaviour from C++ > > class A{ > public: > double x; > } > > class B{ > public: > double& x; > } > A a(1); > B b(a.x); > a.x=2; > assert(b.x == 2); > > Whilie it would be easy to obtain this behaviour with `composite` types, > since they are passed by referece, for elementary types, such as Float64, > thi is not possible since they have a sort of by vlue semantic (yes, I know > it's not exactly like that, but still...) > > Greetings, > Carlo >
