I was recently directed to an article on "tiny types" – an approach to static typing which introduces distinct types for the sake of code clarity, rather than to add particular behaviour to each type. As I understand it, they’re like type aliases with no conversions between the various types. (Unlike plain aliases, an object is genuinely an instance of the relevant tiny type – it doesn’t have "alias erasure" as a language-based solution could easily do.) I like the idea, and wish it were better supported in languages – but it led me to thinking more about the existing … Continue reading How many 32-bit types might we want?
I see a lot of problems which look somewhat different at first glance, but all have the same cause: Text is losing "special characters" when I transfer it from one computer to another Decryption ends up with garbage Compressed data can’t be decompressed I can transfer text but not binary data These are all cases of transforming and (usually) transferring data, and then performing the reverse transformation. Often there are multiple transformations involved, and they need to be carefully reversed in the appropriate order. For example: Convert text to binary using UTF-8 Compress Encrypt Base64-encode Transfer (e.g. as text in … Continue reading Diagnosing issues with reversible data transformations
As I begin to write this, I’m in a small cubicle in Philadelphia airport, on my way back from CodeMash – a wonderful conference (yet again) which I feel privileged to have attended. Personal top highlights definitely include Dustin Campbell’s talk on C# 6 (I’m practically dribbling with anticipation – bits please!) and playing Settlers of Catan on an enormous board. Kevin Pilch-Bisson’s talk on scriptcs was fabulous too, not least because he demonstrated its NuGet support using Noda Time. I’m very likely to use scriptcs as a tool to ease folks into the language gently if I ever get … Continue reading A tale of two puzzles