Improvements in Problem Description

Hi! I had some suggestions regarding framing the challenge descriptions, as I feel that they omit some important things, which leads to a bit of confusion and hit and trial while solving.

My suggestions are in particular for the following stages:

  • Number Literals:

    • It would be nice to reiterate the facts from the book that numbers like 123. and .123 are not supported in the language, where as numbers like 123.123 and 123 are. I felt it was important to reiterate them as I did not read the whole chapter and its specifications (as I did not want to read too much code and instead try my own) before intially trying the stage. After the tests failed, I had to go back to the section, read it thoroughly, and realize what the tests were up to. This is good because it led me to read the book completely, but it was irritating because I wanted to implement it myself and not just look at the code (which inevitably happened).
    • The challenge should mention that while printing the value of the number identifier, the testers always expect a minimum of one decimal place. The output value of 123 and 123.00 should be 123.0, while that of 123.123 should be 123.123. This part is not explicitly mentioned in the book and seems to be a consequence of the chosen implementation route. It would make sense to highlight these differences in floating point numbers, as this was another rabbit hole that I had to go down to discover what the tester expects.
  • String Literals:

    • It would be nice to mention that Lox supports multi-line strings enclosed in "". I had not provided support for that in my implementation, and I discovered it only when I read the book after passing the tests. We should either add a test case here or at least some sort of note about the same would be nice (something like "We don’t explicitly check the same here, but brownie points for implementing it)

None of them are breaking changes, but I do think having them would improve the experience with the challenge. Kudos!

@EshaanAgg Thanks for your detailed suggestions! I’ve shared them with the team and created an internal ticket to incorporate them into the instructions.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.