Talk:Flow-control structures: Difference between revisions

From Rosetta Code
Content added Content deleted
m (Humorous comment on goto's)
(Non-local jumps instead?)
Line 1: Line 1:
I'm not sure why there is talk about Exceptions in the C++ section of this article, but I also don't want to remove it since it shows very good examples. Is there a nice way to move it over to the C++ section of the Exceptions article without destroying the code that's already there (it has a nice example too)? Also, we should probably update it to a newer compiler version. I haven't worked much with Exceptions in C++ so I'm not sure how to do it correctly.
I'm not sure why there is talk about Exceptions in the C++ section of this article, but I also don't want to remove it since it shows very good examples. Is there a nice way to move it over to the C++ section of the Exceptions article without destroying the code that's already there (it has a nice example too)? Also, we should probably update it to a newer compiler version. I haven't worked much with Exceptions in C++ so I'm not sure how to do it correctly.
: You know, looking at this page and the [[Exceptions]] page, I'm beginning to think they ought to be merged. Exceptions are a form of flow control, and the Flow Control article is pretty empty without them. --[[User:Short Circuit|Short Circuit]] 13:22, 4 November 2007 (MST)
: You know, looking at this page and the [[Exceptions]] page, I'm beginning to think they ought to be merged. Exceptions are a form of flow control, and the Flow Control article is pretty empty without them. --[[User:Short Circuit|Short Circuit]] 13:22, 4 November 2007 (MST)
:: Though many languages lump them together, ''Exceptions'' (signalling errors) and ''Non-local Jumps'' (for flow control) are actually different things. And some languages have different features for them, or have different costs associated with those features. So maybe it makes more sense to have a [[Non-Local Jumps]] page in the Flow Control Category, describe the similarities there, and possibly link to [[Exceptions]]. OTOH, one then needs a good example for this page. [[User:DirkT|Dirk Thierbach]] 11 November 2007


[http://xkcd.com/292/ What happens when you use a goto]
[http://xkcd.com/292/ What happens when you use a goto]

Revision as of 09:42, 11 November 2007

I'm not sure why there is talk about Exceptions in the C++ section of this article, but I also don't want to remove it since it shows very good examples. Is there a nice way to move it over to the C++ section of the Exceptions article without destroying the code that's already there (it has a nice example too)? Also, we should probably update it to a newer compiler version. I haven't worked much with Exceptions in C++ so I'm not sure how to do it correctly.

You know, looking at this page and the Exceptions page, I'm beginning to think they ought to be merged. Exceptions are a form of flow control, and the Flow Control article is pretty empty without them. --Short Circuit 13:22, 4 November 2007 (MST)
Though many languages lump them together, Exceptions (signalling errors) and Non-local Jumps (for flow control) are actually different things. And some languages have different features for them, or have different costs associated with those features. So maybe it makes more sense to have a Non-Local Jumps page in the Flow Control Category, describe the similarities there, and possibly link to Exceptions. OTOH, one then needs a good example for this page. Dirk Thierbach 11 November 2007

What happens when you use a goto