Binary - expected output is not decimal representation of a number

The way the “Binary” problem is worded suggests that the expected output should be the decimal representation of the number, i.e. a string consisting of decimal digits:

Convert a binary number, represented as a string (e.g. ‘101010’), to its decimal equivalent using first principles.

Implement binary to decimal conversion. Given a binary input string, your program should produce a decimal output. The program should handle invalid inputs.

However, as far as I can see, in reality the expected output is an integer (a number type, not a string). I’ve checked the exercise in a few language tracks and all of them expect a number output.

Correcting the expected result to be a number is not viable, as it would require changes to many language tracks and would invalidate all current solutions. So I suggest to change the way the problem is stated, to make it clear that we want to obtain a number, not its decimal representation.

1 Like

Which track has that exercise marked active? It’s been depreciated for … 7 years.

1 Like

Solve Binary on Exercism lists 14 tracks. A few but not all also implement All Your Base so it most likely should be deprecated on those tracks.

Edit - I deprecated Binary, Hexadecimal, and Trinary on CoffeeScript. Once Lisp Flavored Erlang has All Your Base implemented first, I can deprecate there.

1 Like

Thanks! I’ve created a github issue in the Roc track repo to remove the deprecated exercises.