Thursday, November 27, 2014

faking type safety in dynamic languages?

Happy Thanksgiving everyone! I was thinking today in doing laundry of a conversation I had with a coworker about the challenge of exposing a .js script to the public and dealing with the public's capacity to hand in anything for variables. I don't know what my coworker did to try to fake the type safety he needed in his situation. I guess if it were me and it were JavaScript, I'd pass the object through a bunch of truthy/falsey interrogations wrapped inside a try/catch and ultimately set a flag for whether or not the visitor was tall enough to ride the rollercoaster ride ahead.

No comments:

Post a Comment