T
Trans
I've just finished reading the beginning of an interesting article on
software reliability at:
http://users.adelphia.net/~lilavois/Cosas/Reliability.htm#Abstract
There is one small part that cought my attention b/c something similar
came up recently in regards to pass-by reference.
"... all connectors should be unidirectional, i.e., they should be
either male (sender) or female (receiver). This will eliminate mix-ups
and ensure robust connectivity."
It was mentioned the previous thread that purely pass-by-value is
arguably the most "proper". But as we all know it is inefficient
--having to copy an object going in only to turn around and reassign it
whence it came:
a = amethod(a.dup)
So I'm wondering might it be possible for the language itself to be
intelligent enough to work as if it were pass-by-value, but catch
situations like the above and work with them on a pass-by reference
bases for efficency, all the while using a pass-by-reference-to-value
under the hood like Ruby currently uses?
In other words, no matter how it works underneath, for the
end-programmer the left side should always be male-output and the right
female-input, and never the twain shall meet.
T.
software reliability at:
http://users.adelphia.net/~lilavois/Cosas/Reliability.htm#Abstract
There is one small part that cought my attention b/c something similar
came up recently in regards to pass-by reference.
"... all connectors should be unidirectional, i.e., they should be
either male (sender) or female (receiver). This will eliminate mix-ups
and ensure robust connectivity."
It was mentioned the previous thread that purely pass-by-value is
arguably the most "proper". But as we all know it is inefficient
--having to copy an object going in only to turn around and reassign it
whence it came:
a = amethod(a.dup)
So I'm wondering might it be possible for the language itself to be
intelligent enough to work as if it were pass-by-value, but catch
situations like the above and work with them on a pass-by reference
bases for efficency, all the while using a pass-by-reference-to-value
under the hood like Ruby currently uses?
In other words, no matter how it works underneath, for the
end-programmer the left side should always be male-output and the right
female-input, and never the twain shall meet.
T.