Originally posted by bpetty
View Post
Announcement
Collapse
No announcement yet.
GCC Lands Support For C++ File-System TS
Collapse
X
-
Originally posted by Kemosabe View Post
So is this just a random collection of words or do you believe in what you're saying? I am not sure what the trolling tag is supposed to say ...
- Likes 4
Comment
-
Originally posted by carewolf View Post
The problem is that if you handled paths unencoded, you will have trouble doing case-insensitive name lookups, since that requires codec awareness. Qt can do that, but then has trouble with stuff that is wrongly encoded. Which is why it is relevant how they handle case-insensitive file lookups. Both macOS and Windows CAN do case-sensitive files, but usually doesn't, and not doing the same as native applications would not be nice and make the standard much less relevant.
- Likes 1
Comment
-
Originally posted by Zan Lynx View Post
If you need an encoded path, then encode it yourself. The problem with APIs that think they're smart by normalizing UTF-8 is that they utterly fail when the filesystem has a name that doesn't follow their nice rules.
So for something like Qt that wants to act native, doing the encoding is essential to work as expected on Mac and Windows. The alternative is to try to do Linux/Unix like filenaming on Windows and Mac, that should work on Mac but be non-standard, and works sometimes on Windows, depending on the backing file-system (at least Microsoft has been working on that, with both this standard and their Linux layer).
- Likes 1
Comment
-
Filesystems don't encode, and should not encode, and lower lever frameworks should not either. Aslong you don't have some stupid scheme where you encode filenames differently than the filesystem does, you don' t need any fragile logic dealing with conversions.
The only system that would be responsible for those conversions would be at the user-interface level, everything else just gets correctly encoded names which means different things depending on platform.
On topic: finally, feels like ages. Did write my own (boost v3) compatible implementation for some embedded system where C++-Exceptions are disabled, thanks to sane interface decisions this is possible.
- Likes 1
Comment
-
Originally posted by carewolf View PostWell. except for the file system which is not POSIX. So for the relevance of this article, it isn't.
btw, linux supports apple filesystems, so by extension linux should also be "not posix"
but it is irrelevant since standard saysImplementations are not required to provide behavior that is not supported by a particular file system. [ Example: The FAT file system used by some memory cards, camera memory, and floppy disks does not support hard links, symlinks, and many other features of more capable file systems, so implementations are not required to support those features on the FAT file system but instead are required to report an error as described above. —end example ]
Comment
-
Originally posted by bpetty View PostI read stuff like this and I am glad I switched to C#.
Originally posted by bpetty View PostI would like to say that C++ has done a good job at making itself irrelevant, but I just posted an image binarization library to github recently and I chose C++ purely for performance reasons.
Originally posted by bpetty View Postbut it can't even read in a PNG without a third party library.
Originally posted by bpetty View PostOne of C++'s recent accomplishments is providing a standard threading api... "ain't nobody got time for that." While the C++ standards committee tries to fresh the language into something that looks like an old, gimped version of C#, I thinks its probably best to just jump into the future, today, and use the real deal. Congrats getting a standardized filesystem api.
- Likes 1
Comment
-
Originally posted by carewolf View PostWell. The problem is that some filesystems requires encoding.
api accepts any of char, char16_t, char32_t, wchar_t
Originally posted by carewolf View PostFor instance filenames are bytestrings in UNIX, but wchar_t strings in Windows
- Likes 1
Comment
-
Originally posted by pal666 View Posti am too glad stupid people are switching away
Originally posted by pal666 View Postwell, c# has no standard(c++-grade iso standard) at all, so it lags behind c++ in standardization
Now I am feeling a little guilty. Sorry for derailing.
Comment
Comment