-
-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add std.experimental.checkedint
#4407
Conversation
433091b
to
4d960b3
Compare
|
comment thread: http://forum.dlang.org/post/jxaisipbdqfifpncnvaa@forum.dlang.org |
| foreach (T; AliasSeq!(double, int[])) | ||
| assert(!(isBasicFixed!T || isFixedPoint!T)); | ||
| } | ||
| +/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this in comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a checkedint-aware version of isFixedPoint, which is currently a private helper in checkedint's package.d, but which I would like to add to std.traits. Search package.d for:
// maybe add these to std.traits? ///////////////////////////|
The table on the overview says |
|
I think |
|
Are |
Well that's embarassing (considering what I'm working on)! Thanks, and Fixed. |
That seems reasonable (but the name should be shorter). I'll wait and see if anyone else has anything to say about that before actually changing it, though. |
|
Overall the basic design/API looks solid, I haven't looked at the code yet though. |
One of my design goals for
Regardless, it costs nothing to include them; it's not like we'd want to use those names for something else... |
|
I don't suppose anyone can tell me why the Even with DDOC, it's fine when I build the docs for my DUB package, which has nearly identical code. |
bdc7f25
to
8054bd3
Compare
|
minor nitpick: could you change the dmd links from http://dlang.org/dmd-windows.html#switch-inline to $(ROOT_DIR)dmd.html#switch-inline
Also is there a way to split up |
I changed it, but now the links don't work - that might just be because the Could you take a look and let me know if I did it right?
I'm not going to change the API layout just to work around a Github limitation that will become irrelevant as soon as this is accepted. Just copy-paste a little of the context and stick it in a D code block when you want to comment; I'll be able to find the spot in the code easily enough. |
|
This has been rejected by andralex. So I'm going to close this unless anyone cares enough to go change his mind. |
|
I hope you'll keep the dub package up with any of the fixes you made here. |
Definitely. I intend to support it, too - if any one actually uses it. Bug reports and pull requests are welcome. I'll consider small feature requests as well, although I consider the design essentially complete. |
|
@tsbockman I read the thread. I'm sorry it went this way. It seems the D Process itself need some bugfixes ;-) anyway thank you for your effort. I hope you had some fun working on checkedint. |
Simply telling people from the start whose approval they actually need would go a long way. I knew that andralex would be involved, but I had expected a community debate over the merits of the design, rather than an apparently abrupt and unilateral decision. There are pros and cons to either approach, but it's not surprising that my effort here failed, given that it was designed to please the people who gave me feedback earlier in the process (and myself, of course), which did not include andralex.
You're welcome. Hopefully someone will find the DUB package useful, whether directly, or as a starting point for a rewrite.
I did indeed. :-) |
The purpose of this package is:
core.checkedint, andFor a more thorough explanation of what problems are solved, and how, please consult the package documentation.
I encourage reviewers to try out the DUB package, as it:
unittestbuild, because it takes too much time (15+ minutes with DMD) and memory (5+ GB) to compile.TODO: changelog entry