News for hackers. Stuff that matters.
Re:Rust for C++ Programmers Part 7: Data Types by pohl on Saturday May 24, 2014 @11:59AM (#7793577)
I won't even consider working at your place of business...

Praise be! The feeling is mutual. I agree to disagree.

Re:Rust for C++ Programmers Part 7: Data Types by teacup50 on Saturday May 24, 2014 @01:17PM (#7793810)
Unfortunately, you'll lower the total value of the ecosystem by producing code and advocating practices that lower the level of reliability and correctness of code -- so agreeing to disagree doesn't really solve the issue that you write bad code.
Re:Rust for C++ Programmers Part 7: Data Types by pohl on Saturday May 24, 2014 @01:48PM (#7793882)
So you're saying that it's not possible to write reliable and correct code in a language like C#, and not one C# programmer in the world is worthy of being a colleague to the great teacup50. That's the logical conclusion of your assertions, for all of its exceptions are unchecked, and it is otherwise semantically similar. If it's possible to write reliable and correct code in C#, then it's possible to write reliable and correct code in Java minus checked exceptions.

As far as APIs are concerned, the important thing is that the API is documented to throw something. It's not at all important that the compiler forces you to pollute either the immediate method's body or its signature and the body of the calling method, etc.

Re:Rust for C++ Programmers Part 7: Data Types by teacup50 on Saturday May 24, 2014 @05:20PM (#7794443)
No, I'm saying it's not possible to write reliable and correct code in C# using exceptions without also doing all the heavy lifting of the compiler. You can also write reliable and correct code in dynamically typed languages, which involves doing even more work on behalf of the compiler.

This is not unique to C#; if you review coding standards for C++, you'll see plenty of people who have adopted a no-exceptions approach, Google included. Simply put, exceptions are a failed experiment, because checked exceptions are the only mechanism by which the type of your methods is fully defined.

As far as API documentation, that something gets thrown is part of the return signature, and it's no more pollution than expressing the return type is.

Your willingness to employ ambiguity as a means to avoid having to do the work necessary to fully specify your system's behavior is a lazy and logically flawed position; it creates a cognitive load for all consumers of your APIs, and breaks the utility of the compiler that we rely on to write and maintain reliable software more easily.

Re:Rust for C++ Programmers Part 7: Data Types by pohl on Saturday May 24, 2014 @05:39PM (#7794489)
Excuse me, but what exactly is it that you think you know about how I write code?
Re:Rust for C++ Programmers Part 7: Data Types by teacup50 on Saturday May 24, 2014 @05:47PM (#7794509)
You rely on human validation of your code's return type values via unchecked exceptions, and don't understand why your code is resultantly ambiguously defined.
Re:Rust for C++ Programmers Part 7: Data Types by pohl on Saturday May 24, 2014 @06:38PM (#7794629)
LOL...If you're just here to argue against your own imagination I guess you don't need me here.
Re:Rust for C++ Programmers Part 7: Data Types by teacup50 on Saturday May 24, 2014 @06:52PM (#7794670)
If you're ignorant to the degree that you don't understand how exceptions are part of the function's return type, it has nothing to do with my imagination.
Re:Rust for C++ Programmers Part 7: Data Types by pohl on Saturday May 24, 2014 @07:09PM (#7794721)
It's only the imaginary me in your head that doesn't understand that.