Strings are terrible representations for file paths. You end up having to do way more work to process them when you're passing it around. Extracting extensions, basenames, crawling up the directory chain etc.
-
-
How does it compare to Python's pathlib?
-
No idea! Never used it before.
End of conversation
New conversation -
-
-
I created a similar path library in Reason: One added benefit is that it statically types whether or not a path is relative or absolute. Let’s you make APIs that accept rel, abs, or that will accept either. https://github.com/facebookexperimental/reason-native/blob/master/src/path/README.md …
-
Omg I love it, stealing some of this API. Thanks for the link!
- 2 more replies
New conversation -
-
-
this sounds very much like how we do Swift stuff where I work. Except we did some operator overload to make the + operators automatically convert to "/" in paths.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 