News for hackers. Stuff that matters.
Re:Shen – A Sufficiently Advanced Lisp [video] by AnimalMuppet on Wednesday September 24, 2014 @01:53PM (#8362954)
The problem is, sometimes I know what I'm doing more than the type system does. But sometimes I only think I know more than it does, and actually it knows more than I do. This makes it very difficult to make the typed-vs-untyped choice "correctly". No matter what you choose, sometimes it's the wrong choice.

What's the answer? Maybe gradual type systems? I dream of an IDE where I have a setting for "type rigidity". I'd start with it "off", and just write the code. Then I'd set it to "warn", and see what it complained about. For code to be production, I'd set it to "error".

But for that to work, I'd need some way of telling the compliler "I really know more than you do about that type error you think you're seeing, so trust me on this one". (In effect, this winds up functioning something like C/C++ casts.) The problem comes when it's right and I'm wrong, but I tell it to trust me anyway...

There are no comments on this comment yet.