---
title: "Comment by Oscar Ablinger on \"Code Smell 100 - GoTo\" | Hashnode"
description: "Solutions Replace GOTO with structured code Use exceptions Imho exceptions aren&#39;t much better. They are essentially a goto where you don&#39;t know where yo"
url: "https://hashnode.com/posts/code-smell-100-goto/61870d4141f03514daf3f6a3/comment/6188603347828111df8008d6"
---

[Discussion](https://hashnode.com/posts/code-smell-100-goto/61870d4141f03514daf3f6a3)

Comment [Code Smell 100 - GoTo](https://hashnode.com/posts/code-smell-100-goto/61870d4141f03514daf3f6a3)

[Nov 7, 2021](https://hashnode.com/posts/code-smell-100-goto/61870d4141f03514daf3f6a3/comment/6188603347828111df8008d6)

> Solutions
> 
> 1.  Replace GOTO with structured code
> 2.  Use exceptions

Imho exceptions aren't much better. They are essentially a `goto` where

1.  **_you don't know where you're going_**,
2.  you can send data with it (including context) and
3.  you can guarantee execution of code if needed (I've never really worked with `goto`s but I assume there is no equivalent to `finally`).

2 & 3 are nice and probably the reason why they are still used today, but 1 is terrible for understanding bigger systems.
