Skip to content

Conversation

@oxe-i
Copy link
Contributor

@oxe-i oxe-i commented Jan 16, 2026

I had many doubts about the difficulty of this one.

This exercise is usually low medium in difficulty (4 or 5), but I made a point of setting arguments to dependent types that enforce restrictions, instead of checking for errors. This is usually more idiomatic and a strong point of Lean, because any invalid argument generates a compiler error and specifications are fully described by the type system.

The problem is that, in order to use those types, arguments must carry with themselves the proof of their validity. But proving things is very different from usual programming practice and more close to mathematics, so the difficulty should be raised to reflect this. But how much?

What do you think?

Copy link
Contributor

@keiravillekode keiravillekode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, using List (Fin outputBase.val) makes all-your-base harder on this track, so it reasonable to increase the difficulty. If we end up with 5 or more Hard exercises so students can earn Difficult trophies, that will be excellent.

Exercism once had binary trinary octal and hexadecimal exercises, each with error-detecting test cases where the input contained invalid characters. These were deprecated for all-your-base. Because we avoid bad-digit test cases in Lean all-your-base, perhaps we should implement one of the old exercises, perhaps hexadecimal

@oxe-i oxe-i merged commit 29f43ba into exercism:main Jan 16, 2026
4 checks passed
@oxe-i oxe-i deleted the addAllYourBase branch January 16, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants