Skip to content

exercises: tests: remove comptime#211

Merged
ee7 merged 2 commits intoexercism:mainfrom
ee7:exercises-remove-comptime
Mar 3, 2023
Merged

exercises: tests: remove comptime#211
ee7 merged 2 commits intoexercism:mainfrom
ee7:exercises-remove-comptime

Conversation

@ee7
Copy link
Copy Markdown
Member

@ee7 ee7 commented Mar 3, 2023

Rationale:

  • There is no more comptime in the tests that can potentially confuse a user. It was required in some of these exercises, e.g. when we wrote something like expected = 42.
  • Test failure messages at comptime can sometimes be more confusing (see e.g. 7dc446e).
  • The main downside is that, for some exercises, we no longer support the user returning a signed integer instead of an unsigned integer. But that's OK.

With this PR, the only remaining occurrence of comptime in this repo is in the binary-search example solution:

$ git rev-parse --short HEAD
06e7bce
$ git grep --break --heading comptime
exercises/practice/binary:search/.meta/example.zig
7:pub fn binarySearch(comptime T: type, target: T, buffer: ?[]const T) SearchError!usize {

@ee7 ee7 requested a review from ErikSchierboom March 3, 2023 12:07
@ee7 ee7 changed the title exercises: remove comptime exercises: tests: remove comptime Mar 3, 2023
@ee7 ee7 force-pushed the exercises-remove-comptime branch from 17c148d to 06e7bce Compare March 3, 2023 13:33
@ee7 ee7 marked this pull request as ready for review March 3, 2023 15:43
@ee7 ee7 merged commit d7cb6ca into exercism:main Mar 3, 2023
@ee7 ee7 deleted the exercises-remove-comptime branch March 3, 2023 15:46
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