Thread overview
[Issue 6664] New: BufferedFile this(HANDLE) uses undefined type.
Sep 13, 2011
Jerry Quinn
Sep 13, 2011
Vladimir Panteleev
Sep 13, 2011
Vladimir Panteleev
Sep 13, 2011
Vladimir Panteleev
Sep 13, 2011
Jerry Quinn
September 13, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6664

           Summary: BufferedFile this(HANDLE) uses undefined type.
           Product: D
           Version: D2
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody@puremagic.com
        ReportedBy: jlquinn@optonline.net


--- Comment #0 from Jerry Quinn <jlquinn@optonline.net> 2011-09-13 12:27:30 PDT ---
HANDLE is a Windows-specific type.  It doesn't belong in the general Phobos API.

However if it's going to be there, it needs to be a documented type and be obtainable in a platform-independent manner.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 13, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6664


Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |thecybershadow@gmail.com
         Resolution|                            |INVALID


--- Comment #1 from Vladimir Panteleev <thecybershadow@gmail.com> 2011-09-13 12:38:11 PDT ---
You are misunderstanding the purpose of such constructors.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 13, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6664


Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |


--- Comment #2 from Vladimir Panteleev <thecybershadow@gmail.com> 2011-09-13 12:42:12 PDT ---
Ignore my last comment.

HANDLE is aliased to int on Posix. BufferedFile is inside std.stream, and the constructor which takes a HANDLE is not in a version(Windows).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 13, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6664



--- Comment #3 from Vladimir Panteleev <thecybershadow@gmail.com> 2011-09-13 12:45:18 PDT ---
Sorry for the knee-jerk close, I thought you were talking about something in std.stdio which allows construction from a HANDLE on Windows platforms.

For the record, std.stream is generally regarded as obsolete code which simply hasn't been rewritten yet. You may find that this is by far not the only poor design decision in the module.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 13, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6664



--- Comment #4 from Jerry Quinn <jlquinn@optonline.net> 2011-09-13 13:16:39 PDT ---
(In reply to comment #3)
> Sorry for the knee-jerk close, I thought you were talking about something in std.stdio which allows construction from a HANDLE on Windows platforms.
> 
> For the record, std.stream is generally regarded as obsolete code which simply hasn't been rewritten yet. You may find that this is by far not the only poor design decision in the module.

That's certainly fine.  It might make sense to put a note at the top of the std.stream page that features are subject to change.

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