Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you were building a sandcastle, a type system is like plastic forms in the shape of castle components (walls, towers, etc)... They help you create a better sandcastle...

This article was essentially saying: "You can remove the forms when you are done and your sandcastle will still stand."



By that same analogy, building up a sand castle by only using those molds is a ridiculously hard way to build some castles.


Fortunately some languages allow you to construct your own custom molds within the language itself.


Right, I was not trying to make an absolute "type systems are bad" statement. Just pointing out that the analogy can be used to cut both ways. :)

Indeed, I think the analogy has pretty good legs. Consider, if you are working with cast iron, molds are the way to go.


and in others,one isnt even allowed to use his hands...


Your hands are your mind... you think the types, check the types, and erase them, but do all of it briefly, while playing with that part, and then move away.

Compiled languages are like building a bunch of plaster mold, and then just doing the castle in one step.

Optional typing, or using Any types and casting, is like using molds for a nice foundation, and using your hands to add little bits on top.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: