Thanks for sharing. I like this a lot. It always feels tedious doing the checking, especially in nested objects. Syntactic sugar like this makes programming more fun and lets you focus on the important stuff. This is also one of the reasons why I don’t like php syntax, with its isset, empty, is_null etc.
Sure, there are drawback to this method, although I've been using it in a large project for quite some time now and frankly didn't find many practical issues so far. I'm not saying you're wrong obviously, but can you provide some actuals example of when this could cause issues?
I'm a typescript guy (or any statically typed language) so I view stringly typed as the single worst thing possible. The potential to make typos that are difficult to find is just too high for me.
62
u/impreson Feb 20 '18
Thanks for sharing. I like this a lot. It always feels tedious doing the checking, especially in nested objects. Syntactic sugar like this makes programming more fun and lets you focus on the important stuff. This is also one of the reasons why I don’t like php syntax, with its isset, empty, is_null etc.