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
String.blit should be [@@ocaml.deprecated] #6541
Comments
Comment author: jpdeplaix And same thing for String.unsafe_blit of course. |
Comment author: @gasche String.set is deprecated because there is no string that is being set with its new -safe-string type: On the contrary, I don't think this function need to be deprecated. |
Comment author: jpdeplaix Why is String.fill deprecated then ? |
Comment author: @gasche The argument of |
Comment author: jpdeplaix But String.fill has also a bytes argument. The point is: it should be deprecated as it was before used to modify strings. |
Comment author: @damiendoligez The point is that String.blit (unlike String.fill) does have a string argument, so it arguably belongs in the String module. The idea of the warnings is not to catch strings that should be bytes (the typechecker does that perfectly), it's more to gently remind the programmers that they should be converting to Bytes. So it's not a big deal if some functions are not marked deprecated even though their type has changed. |
Original bug ID: 6541
Reporter: jpdeplaix
Status: closed (set by @xavierleroy on 2016-12-07T10:47:20Z)
Resolution: not a bug
Priority: normal
Severity: minor
Version: 4.02.0+beta1 / +rc1
Target version: 4.02.2+dev / +rc1
Category: standard library
Bug description
As it should be replaced by Bytes.blit_string, String.blit should be flagged as deprecated.
The text was updated successfully, but these errors were encountered: