Seeing types where others don't

26 points by eatonphil


typesanitizer

This was a really fun (and unexpected!) article. Re: the final takeaway:

If you would like to take anything away from this article, I believe it should be that we are nowhere near the full potential of leveraging types in our languages, we’re leaving too much on the table

If you look at the errors emitted by databases when you have type errors, sometimes one needs a fair bit of head-scratching to figure things out. And databases have so many more users compared to (even popular) tools like jq.

So yeah, I've definitely felt the same sentiment that the author is echoing.

shapr

The program jq was originally written in Haskell, would it help to look at the original and see how the types fit?

koala

My variant of this is "your database may be schemaless, but your data definitely has a schema".

To me it's pretty "clear" that types have a cost that only is a net positive beyond a certain size. But I think the evidence is thin...

(My favorite language is bash, because I think it's the language that does its thing better than any other language does its. However, its thing is writing one liners, which I do frequently, but it's not all I do.)

lilac

I think there’s a valuable lesson in here about teaching programming to people. I see so much beginner programming material brush off types, refusing to acknowledge them, as if they’re some shameful bit of programming that deserves no love.

but when you pass around a string in python, python still knows it’s a string. every single value still has a type. you’re not doing beginners some great big favor by removing complexity from the equation until they’re “ready for it”. you’re just sweeping it under the rug and lying to them about. you are depriving them of a helpful tool to shape their learning and provide deeper meaning into what the computer is doing.