Name of a particular property

Started by
12 comments, last by TheChubu 10 years, 10 months ago
How does the documentation for std::cin describe it?
[ dev journal ]
[ current projects' videos ]
[ Zolo Project ]
I'm not mean, I just like to get to the point.
Advertisement

Yes, I am not building a language. But some of my library's functions simply behave that way to allow for arbitrary amounts of data to be provided and at any rate, not limited by the amount of data that can be physically present on one invocation of the function (think about a network socket, for instance, you don't know how much data you are going to receive next, you could receive it all in one shot, or one byte each time you check, so you need a way to make it work the same regardless of how much you've got every time you poll the socket - there are other examples of course). Actually everything is quite consistent overall.

How does the documentation for std::cin describe it?

It doesn't really say anything, actually. The std::cout version says it "inserts" into the stream. I think the notion of stream might help me describe it, though.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

Hello,

in my library I'm working on, I have a few functions which take (among other parameters) a data buffer, with the property that calling such a function twice in succession, with two data buffers, is equivalent to calling it once with the ordered concatenation of both data buffers. In other words:


F("hello")
F(" ")
F("world")

Is strictly equivalent to:


F("hello world")

Is there a name for such a property? For instance a function such that F(F(x)) = F(x) is called idempotent. I'm asking because I'm tired of describing this property in such a long-winded manner in my documentation, and it would be nice if there was a word I could use to sum it all up efficiently.

Thanks!

I don't know of a name, but I can make one up: "concatenation invariant". smile.png

Buffered concatenation........?

Beginner in Game Development?  Read here. And read here.

 

Buffered invariant concatenation!

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

This topic is closed to new replies.

Advertisement