Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006141OCamlOCaml documentationpublic2013-08-27 16:222014-05-25 20:20
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformOSOS Version
Product Version 
Target Version4.02.0+devFixed in Version 
Summary0006141: Document Char.unsafe_chr

1) Char.unsafe_chr is widely used in third-party low level libraries which are not part of stdlib.

2) People who don't know Char.unsafe_chr exists replicate it using Obj.magic (this is what I used to do) This is bad.

3) It's no more unsafe that other unsafe_ functions in the stdlib which are documented.

As an example, in very fast lexing code, where we know an integer is actually a byte in the range 0...255, Char.chr can be quite a cost.
Tagsjunior_job, patch
Attached Filesdiff file icon unsafe_chr_documentation.diff [^] (581 bytes) 2013-12-29 16:58 [Show Content]

- Relationships

-  Notes
pminten (reporter)
2013-12-29 16:59

Here's a patch to add a bit of documentation to Char.unsafe_chr.

- Issue History
Date Modified Username Field Change
2013-08-27 16:22 johnwhitington New Issue
2013-08-28 11:05 doligez Status new => confirmed
2013-08-28 11:05 doligez Target Version => 4.01.1+dev
2013-09-03 17:18 gasche Tag Attached: junior_job
2013-12-29 16:58 pminten File Added: unsafe_chr_documentation.diff
2013-12-29 16:59 pminten Note Added: 0010769
2014-01-17 17:57 doligez Tag Attached: patch
2014-05-25 20:20 doligez Target Version 4.01.1+dev => 4.02.0+dev

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker