My programs issues
pascal111
judas.the.messiah.111 at gmail.com
Wed Aug 10 13:38:43 UTC 2022
On Wednesday, 10 August 2022 at 13:22:03 UTC, rikki cattermole
wrote:
>
> On 11/08/2022 12:36 AM, pascal111 wrote:
>> 2) I used "goto", I heard from someone before that using
>> "goto" isn't good programming feature.
>
> This is mostly a historical debate at this point.
>
> Back 40 years ago, goto wasn't typically limited within a
> procedure and doesn't have any checks in place to prevent you
> doing bad things.
>
> These days languages will implement such checks (including D).
>
> Some of the historical papers which debate this can be read
> from the book Literate Programming by Donald Knuth. If you do
> get the chance to read it, its a good read for cover to cover
> and teaches you a lot of the historical context that you may
> not get elsewhere.
>
> https://www.amazon.com/Literate-Programming-Lecture-Notes-Donald/dp/0937073806
I remember the famous problem at old days called "spaghetti
code". But yes, D is modern and structured language and has good
checks to prevent "goto" problems, but it's, "goto" still as you
said a topic of historical debate.
More information about the Digitalmars-d-learn
mailing list