[Issue 8642] Fix `fopen` and friends signatures on Windows to not accept `char*`

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 11 20:16:12 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8642



--- Comment #11 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-09-11 20:16:31 PDT ---
>> D merely provides a straightforward, direct call to them.

> And this is the point. We understand it in different ways.

I have no idea how you could misunderstand that. I only see one way to
interpret that, which is that we simply provide C bindings and you have to deal
with whatever quirks the C function has, just like you would have to in C. The
bindings in druntime are provided so that Phobos can build better abstractions
on them and so that D programmers have direct access to system functions where
necessary.

If you want a cleaner API around a C function, then create a D wrapper. In the
case of fopen, that's done with std.stdio.File. We're not trying to clean up C
APIs or make them easy-to-use, just provide bindings for them.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list