News for hackers. Stuff that matters.
Re:Returning multiple values from functions in C++ by eliben on Monday March 07, 2016 @07:54AM (#11238583)
The idea was to show things that actually make sense as return values / statuses rather than exceptions. I surely wouldn't throw an exception for "getline reached EOF"
Re:Returning multiple values from functions in C++ by rileymat2 on Monday March 07, 2016 @11:30AM (#11239755)
Yeah, I am not for overusing exceptions, but languages like python make creative use of exceptions. For instance the generator syntax raises an exception when it is done. Interestingly, you can make a generator to go through the lines in a file, and use that when you are at the EOF.