Tenho que usar o Python durante os próximos 2 anos para um projeto importante. Infelizmente o Python é uma linguagem do século XIX, ou mesmo do tempo da Inquisição. O criador do Python tem hoje, dia 18-11-2016, a seguinte afirmação na documentação online da linguagem:
Future compatibility note: It may be tempting to assume that the character set for 8-bit characters is ISO Latin-1 (an ASCII superset that covers most western languages that use the Latin alphabet), but it is possible that in the future Unicode text editors will become common. These generally use the UTF-8 encoding, which is also an ASCII superset, but with very different use for the characters with ordinals 128-255. While there is no consensus on this subject yet, it is unwise to assume either Latin-1 or UTF-8, even though the current implementation appears to favor Latin-1. This applies both to the source character set and the run-time character set.
Eu não sei como é que se consegue dizer tantas barbaridades num único parágrafo, ainda para mais de um tipo com a responsabilidade de gerir uma linguagem de programação que quer continuar a acordar amanhã.
O futuro não nasce do nada. Somos nós que fazemos o futuro e eu quero que o futuro seja Unicode. Infelizmente o meu futuro (de médio prazo) vai ter que ser Python também.
De onde é que saíram estes tipos?
Deixe um comentário