-
-
Notifications
You must be signed in to change notification settings - Fork 706
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
Correct docs & deprecation message in std.complex. #1730
Conversation
|
Hmm. I think referring to It would take a while before a newbie even begins to understand just what |
|
I made that tweak because |
|
Really? I thought the unittest examples used Just my opinion, though. I'll let the Phobos devs give the official position. |
|
The point is that the relevant version of |
|
Ah, sorry I didn't get your point the first time. My take on that is that users should be encouraged to use My point is, instead of: they should use: |
|
Yea, you're right, I didn't get your meaning properly before. I don't know how the old, deprecated toString was meant to be used -- presumably as a consequence of using some other external function, rather than calling it directly? The new So, if that's true, the deprecation message should be in reference to what the old external function was, which For now, I've tweaked the docs with a compromise solution: the deprecation message requests the use of |
| import std.numeric; | ||
| import std.traits; | ||
| import std.format, std.math, std.numeric, std.traits; | ||
| version(unittest) { import std.string : format; } |
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.
I think version unittest imports are generally a terrible idea. I've seen the release broken 3 [edit]times[/edit] because of this, one of which in an actual release.
Please have each individual unittest that require it (it's what 1?) include what it needs individually.
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.
OK, this is turning into more hassle than it's worth -- I think I've messed up too many things here. I'm going to push a complete fresh patch with all feedback taken into account.
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.
On Wed, Nov 27, 2013 at 10:36:52AM -0800, Joseph Rushton Wakeling wrote:
OK, this is turning into more hassle than it's worth -- I think I've
messed up too many things here. I'm going to push a complete fresh
patch with all feedback taken into account.
[...]
git rebase -i is your friend. :)
T
Those who don't understand Unix are condemned to reinvent it, poorly.
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.
Already using it :-)
|
unittest import apart, lgtm. please squash though :) |
Reference to std.format.format [sic!] should be to std.string.format. I've also taken the opportunity to slightly clean up the module's import statements and some whitespace errors.
|
OK, squashed and (I think) properly corrected. The And some whitespace has been cleaned up, because in tweaking one of the doc statements I realized the file had a bunch of tabs left over from a previous author ;-) |
|
That would be me again. :-/ I seriously need to just switch wholesale to |
|
My filetype plugin indent on
syntax on
set sts=0 sw=4 ts=4
autocmd FileType c,cpp,d,java,php autocmd BufWritePre <buffer> :%s/\s\+$//e
autocmd FileType c,cpp,d,java :setl cinoptions=(0,u0,U0
autocmd FileType c,cpp set noet
autocmd FileType d,java set etGives me mixed tab-space indent in C/C++, space indent in D and Java (not that Java is something I work with, but one should Be Prepared:-). Note that I use the ctab plugin by Michael Geddes: http://www.vim.org/scripts/script.php?script_id=231 |
We've all been there. No-one will any stones at you ;) |
Correct docs & deprecation message in std.complex.
|
Thanks for the quick merge, and sorry for the noise/confusion :-) |
Reference to std.format.format [sic!] should be to std.string.format.
I've also taken the opportunity to slightly clean up the module's import statements and some whitespace errors (someone in the past had left a bunch of tabs lying around:-)