"value":"\n <p>If it looks like a duck, walks like a duck, and quacks like a duck, it must be a duck.<\/p>\n\n<p>If I pass a parameter into a function, as long as it works with the code within the function - it is of the correct type and has the expected properties and methods - it will work, although nothing is enforcing that the correct thing is passed in.<\/p>\n\n<p>If not, you'd get an error that the method or property doesn't exist when trying to invoke or access it.<\/p>\n\n<p>This is the opposite of strict typing, where you'd get a Type error if you passed the wrong thing.<\/p>\n\n<p>Both are valid approaches, though I prefer to use types and get specific error messages and leverage tools like static analysis, which work better the more it understands your code.<\/p>\n\n<p>In particular when writing and using open-source code that anyone can use however they like, I'd suggest leveraging types and type-checking, but it depends on what you, your team or your community prefer.<\/p>\n\n ",
"format":"full_html",
"processed":"\n <p>If it looks like a duck, walks like a duck, and quacks like a duck, it must be a duck.<\/p>\n\n<p>If I pass a parameter into a function, as long as it works with the code within the function - it is of the correct type and has the expected properties and methods - it will work, although nothing is enforcing that the correct thing is passed in.<\/p>\n\n<p>If not, you'd get an error that the method or property doesn't exist when trying to invoke or access it.<\/p>\n\n<p>This is the opposite of strict typing, where you'd get a Type error if you passed the wrong thing.<\/p>\n\n<p>Both are valid approaches, though I prefer to use types and get specific error messages and leverage tools like static analysis, which work better the more it understands your code.<\/p>\n\n<p>In particular when writing and using open-source code that anyone can use however they like, I'd suggest leveraging types and type-checking, but it depends on what you, your team or your community prefer.<\/p>\n\n ",