Hmm... isn't Matlab dynamically typed so what does type-checking like that actually help with?
-
-
Not sure I understand what you mean. You can have a variable that is an integer type (say uint8 which is basically a byte with 0-255). The function checks if it is an integer variable.
1 reply 0 retweets 0 likes -
2 replies 0 retweets 0 likes
-
-
Basically, I am talking about best practices in dynamically types languages. It's a programming issue you learn in undergrad in computer science — sorry I was unclear!
1 reply 0 retweets 0 likes -
You need a try-catch block since it's dynamically typed.
1 reply 0 retweets 0 likes -
I try (ironic) to avoid try-catch clauses like the plague. Anyway, only got up cause I couldn't sleep but I'm going back to bed now... :)
1 reply 0 retweets 0 likes -
Exception handling is really good practice.
1 reply 0 retweets 3 likes -
Yes perhaps I'm missing another thing here. I meant actual try-catch in Matlab where you don't know what the error is in the end. Makes things very hard to debug.
1 reply 0 retweets 0 likes -
You know the error, that is how you catch it. See section called "Handle Different Types of Errors": http://se.mathworks.com/help/matlab/ref/try.html …
2 replies 0 retweets 1 like
That is what try-catch is. If you use it to catch all errors, that is REALLY bad practice.
-
-
Yes indeed. It's not the only bad practice. eval is another great evil... I was once in a place where they had written an entire script using eval commands... *shudder*
1 reply 1 retweet 1 like -
Wow.
0 replies 0 retweets 0 likes
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.