Re:Why Is Swift's String API So Hard?
by mozumder on Saturday November 07, 2015 @05:57AM
(#10524429)
Yep. He basically just described "classes" in the object-oriented world.
[ Parent
| on HN ]
Re:Why Is Swift's String API So Hard?
by tokenrove on Saturday November 07, 2015 @09:07AM
(#10524815)
I don't think it has much to do with classes. Python, for example, has no pathname/string distinction that I know of.
Common Lisp is in the object-oriented world, and indeed some of the things mentioned are implemented as classes. I think the point was more about the standard library's attempt to do The Right Thing and how library implementors tend to follow that.
(Also, for better or for worse, CL's pathnames contain information like host, device, and version, that aren't so relevant on the major OSes in use these days; but try dealing with VMS filenames with Ruby's Pathname...)
Device and even host are quite common in the Windows world:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...
Volume = Device
Or Microsoft's UNC path:
https://en.wikipedia.org/wiki/Path_(computing)#Uniform_Namin...
\\ComputerName\SharedFolder\Resource -> \\host\device\path