Added alphametics exercise to the track#969
Added alphametics exercise to the track#969marcelweikum wants to merge 0 commit intoexercism:mainfrom
Conversation
|
Hello. Thanks for opening a PR on Exercism 🙂 We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in. You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch. If you're interested in learning more about this auto-responder, please read this blog post. Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it. |
| @@ -0,0 +1,14 @@ | |||
| #ifndef ALPHAMETICS_H | |||
There was a problem hiding this comment.
@vaeng @siebenschlaefer What's our take on include guards? We have 64 exercises that use #if !defined(...), two use #ifndef ..., and 21 with #pragma once. Shouldn't we unify this? My vote would go to #pragma once for being the shortest and least error-prone. The only argument against it is the lack of standardization, but all relevant compilers implement it (and have done so for decades), so that's not a strong argument in my book. Wdyt?
There was a problem hiding this comment.
I'm all for once. I would have to look it up, but I'm pretty sure I favored it in the header exercise as well
There was a problem hiding this comment.
https://en.wikipedia.org/wiki/Pragma_once
Thus, #pragma once serves the same purpose as #include guards, but with several advantages, including less code, avoidance of name clashes, and sometimes improvement in compilation speed.
There was a problem hiding this comment.
Not a hard "No" vote but I prefer include guards over pragma once because the former ist standadized and the latter involves file system semantics.
See https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rs-guards
But if you folks like pragma one more and think all exercises should do the same then go for IT.
Hey,
this is my first PR, please check thoroughly if I missed something or did something wrong!
Thank you very much.
Kind regards,
Marcel