willhbr.net · 8d · discuss
And so, my fellow programmers: ask not what your compiler can do for you—ask what you can do for your compiler. — John F. Kennedy A friend and I were talking about the (somewhat) new consuming and borrowing keywords in Swift, which led to the question “what’s the point, can’t the compiler just work it out for me?” which I think is worth some interrogation. When I used to teach programming at university, one of the common pieces of confusion stemmed from strong typing. For someone who is new to programming, "5" (string) and 5 (integer) are not meaningfully different....