[Issue 1482] std.file docs are insufficient
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Sep 11 07:04:36 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1482
------- Comment #3 from jlquinn at us.ibm.com 2007-09-11 09:04 -------
(In reply to comment #1)
> It returns an array of the bytes that it read from the file. I think that the
> bug here is that the specs don't describe what a void[] really is. Closest to
> that is the "Implicit Conversions" sections here:
>
> http://digitalmars.com/d/arrays.html#strings
> (linked to closest anchor, scroll a bit below)
>
> A void[] is functionally the same as a byte[] or ubyte[], with the differences:
It's essentially the same as char[] as well, then, right? A char is really
just a byte that is given preferential treatment as a UTF-8 string, no?
> The std.file functions aren't part of a class. Upside is simple and readable
> code for small programs, downside is possible name collisions ("read"/"write"
> is a common thing to be found in the global namespace). Yay for
> selective/static/renaming imports,
The docs don't make this 100% clear. I think it's mostly visual formatting,
combined with a lack of a cohesive summary for the module.
A related doc note ... I find that the docs make it difficult to distinguish
the methods associated with a class when there multiple classes on a single
page. Again, I'd call it visual formatting.
Another issue I found is that I didn't get a definitive answer on whether
reading files automatically treats them as UTF-8 or not.
> P.S. It's none of my business, but is IBM interested in D now? :)
I can't speak for the company, but I personally find the core language more
pleasant than C++. If it offers better performance than java then it becomes
more interesting to me :-)
--
More information about the Digitalmars-d-bugs
mailing list