LWN.net Logo

Leaky abstractions

Leaky abstractions

Posted Feb 10, 2011 12:05 UTC (Thu) by tialaramex (subscriber, #21167)
In reply to: Moving to Python 3 by cortana
Parent article: Moving to Python 3

So long as the programmer never knows, I don't care.

But in my experience it's surprisingly hard to prevent this abstraction from leaking. Text is really tricky, in fact one of the main lessons from the Unicode project is that text is way trickier than anyone had really thought before.

For example, what happens with canonicalisation in Python?

(You will not be surprised to know that the answer in C is generally "C does not care about canonicalisation, it's all byte strings to us")


(Log in to post comments)

Leaky abstractions

Posted Feb 10, 2011 17:11 UTC (Thu) by marcH (subscriber, #57642) [Link]

Except for wchar_t?

Leaky abstractions

Posted Feb 11, 2011 4:06 UTC (Fri) by tialaramex (subscriber, #21167) [Link]

The standard conveniently permits that wchar_t can be char, allowing you to ignore it altogether :D

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds