Re: Ripple effect



Jeffrey R. Carter wrote:

Why?
If you remove some use clause that might affect the visibility of some primitive operation, then it will also remove the whole type that is involved in a given expression, rendering the whole as illegal.

Could you provide a short example of this Ripple effect?

No. I'm simply aware that STT cites direct operator visibility as potentially giving rise to the Ripple effect in the Ada FAQ

http://www.adapower.com/index.php?Command=Class&ClassID=FAQ&CID=358

Yes, I've seen it already. Still, something is missing.

As a C++ programmer, I like the idea of doing this:

std::cout << "Hello";

without writing using namespace std - the stream insertion operator will be found in the appropriate namespace (std in this case) and it's enough to qualify std::cout to make it happen. Without this feature, I would need to write this:

std::operator<<(std::cout, "Hello");


Now, adding or removing #include directives might change one legal C++ program into another legal program, but this is due to implicit conversions - without them I don't see any way for this to happen.

That's why the assertion that such effect is possible in Ada strikes me a little bit.
Waiting for examples.


--
Maciej Sobczak : http://www.msobczak.com/
Programming : http://www.msobczak.com/prog/
.



Relevant Pages

  • Re: Ripple effect
    ... primitive operators of a type have this kind of visibility. ... one of the reasons that this was not accepted was that it would lead to Ripple effects: adding or removing a unit from a context clause could change one legal program to a different legal program. ... If you remove some use clause that might affect the visibility of some primitive operation, then it will also remove the whole type that is involved in a given expression, rendering the whole as illegal. ...
    (comp.lang.ada)
  • Re: Ripple effect
    ... If you remove some use clause that might affect the visibility of some primitive operation, then it will also remove the whole type that is involved in a given expression, rendering the whole as illegal. ... No. I'm simply aware that STT cites direct operator visibility as potentially giving rise to the Ripple effect in the Ada FAQ ...
    (comp.lang.ada)