3 ms·
It entirely depends on the language as to the level of acceptability of using exceptions for control flow. In Java, it's moderately routine to get a random exce
by gte910h 14y ago
It entirely depends on the language as to the level of acceptability of using exceptions for control flow. In Java, it's moderately routine to get a random exception or two that you recover from and go along your way merrily. Python similarly is A-OK much of the time.
In Objective C, exceptions are "he's dead Jim" territory.
Some of the differences of use are caused by the implementation of exceptions in those environments and the expectations programmers of libraries in those environments to what happens when exceptions occur.
- BruceM 14y agoMany years ago, there was a language called TOM. TOM was a descendant of Objective C, but with garbage collection, blocks, some other stuff ... and a Common Lisp style condition system (before Objective C had exceptions or blocks or GC or ...). http://gerbil.org/tom/ http://gerbil.org/tom/ Sadly dead once the author got his PhD though.
- gte910h 14y ago> garbage collection, blocks Blocks exist in Objective C. GC did, but was replaced for Automatic Reference Counting (ARC). ARC is good enough in mobile and probably better for Desktop.
- BruceM 14y agoLet me quote a couple of relevant parts of my comment: > Many years ago > (before Objective C had exceptions or blocks or GC or ...) TOM had the things that I mentioned back in 1998, 1999, maybe earlier. Objective C has come a long way since then.