Page 1 of 1
When try - catch is inevitable ?
Posted: Sun Jan 02, 2011 10:12 am
by jankidudel
Please show me an example when try - catch can't be substituted for if(!$something)....
Re: When try - catch is inevitable ?
Posted: Sun Jan 02, 2011 10:26 am
by Weirdan
I don't think there are such examples because languages with exception support still Turing-equivalent to languages without exceptions. But exceptions may allow for cleaner, clearer code.
Re: When try - catch is inevitable ?
Posted: Fri Jan 07, 2011 7:45 am
by josh
Show me an example of a PHP script that can't be written in assembly language
Re: When try - catch is inevitable ?
Posted: Fri Jan 07, 2011 7:58 am
by Jenk
josh wrote:Show me an example of a PHP script that can't be written in assembly language
That's a bit of a tautology, isn't it? Given PHP is an abstraction of C, which is an abstraction of Assembly?
Re: When try - catch is inevitable ?
Posted: Fri Jan 07, 2011 10:12 am
by josh
I guess that's the point. tautology = different ways of saying the same thing. Conditionals & exceptions are different ways of saying the same thing. (thanks for the new word!)
Re: When try - catch is inevitable ?
Posted: Mon Jan 10, 2011 5:04 am
by Jenk
You can thank xkcd (
http://xkcd.com/703/) for bringing that word to my attention
