C++ Translation. Re: The difficulty doesn't go up much for the user's side. Getting random tests up and working was a living hell, though, since I couldn't make assumptions about implementation details and it's miserable trying to deal with overloaded functions on the type level. I don't expect this to get approved since C++ is the odd one out between the available languages, but who knows. Only downside of this being C++ is that unimplemented functions result in compile time errors rather than gentle runtime errors, but that's a given.
That's true. I remembered the Kata much differently than what it is, and the fixed tests are rather a breeze. All the problems I expected actually show up when trying to adapt the random tests. If I find a clean way to implement the random tests, I'll publish the translation
This comment is hidden because it contains spoiler information about the solution
Your wish is granted
The std::exchange + ternary made it perfect. Nice work!
I apologize, I misunderstood the problem.
can you elaborate?
just have the test suite arbitrarily run them each once
C++ Translation. Re: The difficulty doesn't go up much for the user's side. Getting random tests up and working was a living hell, though, since I couldn't make assumptions about implementation details and it's miserable trying to deal with overloaded functions on the type level. I don't expect this to get approved since C++ is the odd one out between the available languages, but who knows. Only downside of this being C++ is that unimplemented functions result in compile time errors rather than gentle runtime errors, but that's a given.
That's true. I remembered the Kata much differently than what it is, and the fixed tests are rather a breeze. All the problems I expected actually show up when trying to adapt the random tests. If I find a clean way to implement the random tests, I'll publish the translation
I am not sure about this. I think that the goal of the kata could be achieved with a simple overloading, couldnt it?
This comment is hidden because it contains spoiler information about the solution