I want off Mr. Golang's Wild Ride

Mark smarksc at gmail.com
Sun Mar 1 15:07:38 UTC 2020


On Saturday, 29 February 2020 at 04:54:22 UTC, H. S. Teoh wrote:
> On Fri, Feb 28, 2020 at 02:50:05PM -0800, Walter Bright via 
> Digitalmars-d wrote:
>> https://fasterthanli.me/blog/2020/i-want-off-mr-golangs-wild-ride/
>> 
>> This is a very worthwhile read. There's a lot for us to learn 
>> here.
>
> The most glaring point to me is Phobos' ubiquitous use of 
> `string` everywhere for filenames. The fact that strings are 
> assumed to be valid UTF-8 will almost certainly land us in the 
> same complaints as the author had about Go's handling of 
> pathnames.
>
> Changing that would be a major code breaker, though. So I'm not 
> sure if we should even attempt to!
>
>
> T

A very similar complaint can be found in a recent blog post [1] 
about Mercurial's transition from Python2 to Python3:

"Perhaps my least favorite feature of Python 3 is its insistence 
that the world is Unicode. In Python 2, the default string type 
was backed by bytes. In Python 3, the default string type is 
backed by Unicode code points. As part of that transition, large 
parts of the standard library now operate in the Unicode space 
instead of the domain of bytes. I understand why Python does 
this: they want strings to be Unicode and don't want users to 
have to spend that much energy thinking about when to use str 
versus bytes. This approach is admirable and somewhat defensible 
because it takes a stand on a solution that is arguably good 
enough for most users. However, the approach of assuming the 
world is Unicode is flat out wrong and has significant 
implications for systems level applications (like version control 
tools)."

[1] 
https://gregoryszorc.com/blog/2020/01/13/mercurial's-journey-to-and-reflections-on-python-3/


More information about the Digitalmars-d mailing list