[Issue 1985] import expression should return ubyte[] not string

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 3 08:53:14 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=1985

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |razvan.nitu1305 at gmail.com
         Resolution|---                         |WONTFIX

--- Comment #12 from RazvanN <razvan.nitu1305 at gmail.com> ---
1. The primary purpose of the import keyword is to import other modules. Since
its meaning is tied to importing text files, it makes sense to return a string.
If you want to read files of arbitrary types, std.file.read should be used.

2. This particular semantic of the import keyword is not widely spread. I,
personally, have never seen it in any of the D projects that I contributed to.

So, since this is not a widely used feature and the import semantic is tied to
text file, I will close this as WONTFIX.

--


More information about the Digitalmars-d-bugs mailing list