Summary: Signed file lengths and positions
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos

--- Comment #0 from 2011-01-13 16:15:53 PST ---
In File size() returns an ulong, given by seek():

It uses fseek, that seems to return a signed value:

So isn't it better and safer if those functions of File return a long instead
of an ulong?

See also bug 3843 but here the values are 64 bit, so while 4 GB arrays of bytes
are possible, files of just 9_223_372_036_854_775_807 bytes are not a
significant limitation compared to files 18_446_744_073_709_551_615 bytes long.

Currently unsigned values are quite dangerous in D, so I suggest to avoid
introducing them in Phobos unless where they are necessary.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to