Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's interesting how go and python have similar achilles heels, namely the way they handle strings (python's print was highlighted as a similar performance problem in another post recently in HN). I wonder if there will ever be a solution to this issue (i.e. the marshalling/demarshalling of potential unicode/runes to bytes and vice versa), or are we forever stuck in this tradeoff?


I think Go's "everything is UTF-8 unless you really need something different" approach is pretty sensible - it may not be the best for performance, but it saves you a lot of headaches...


Python printing flushes the buffer. That’s slow in every language.


Isn’t it just the standard line-buffering of stdout?

Print sends a newline by default but i don’t think it flushes explicitly (hence the flush keyword parameter).


The obvious compromise is ASCII for code and utf8 for data. Although personally I like the idea of applying the function man in a business suit levitating. At least recreationally.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: