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
Fix issue #15642 - make std.utf.encode return ubyte #5077
Conversation
|
what is the reason for the change? |
To make it clear that result is really small and to avoid explicit casts from |
I don't know. Lengths are normally done with
It's an enhancement request. It hasn't been specifically approved by Walter or Andrei. So, the fact that it's in bugzilla just means that someone thought that it was a good idea and put it in bugzilla. That doesn't necessarily mean that we should actually do it. It might be a great idea, and it might not be. That has yet to be decided. Honestly, I think that the argument for making the change is pretty weak and that it would be better to just leave it as-is - particularly since we're trying to use |
I'm also hesitant to this change. |
Understood, many thanks for thorough explanation! I'm deleting this PR then. |
Thank you for working on phobos |
The impetus for the enhancement request: https://github.com/schveiguy/iopipe/blob/master/source/iopipe/textpipe.d#L306 i.e. I don't want to add 3 or 7 more bytes to a struct for no reason, especially one that is passed around by value. Is it fully backwards compatible? You can think of arbitrary code that someone would use auto and then proceeds to add a bunch to that value, but the API sure doesn't lend itself to that usage. You can't just pass in an arbitrary I don't know, I think with VRP in D, using the smallest type that can hold a result makes a difference when writing nice clean code (i.e. I hate having to use casts for such things that should be obvious). If there were some other way to mark a If you think the enhancement request is not worthy, please close the request as well. And thanks @byebye for trying! |
No description provided.