[DGD] Scope call syntax

quixadhal at gmail.com quixadhal at gmail.com
Tue Feb 14 00:27:38 CET 2017


Here’s an example of a thing I couldn’t easily do without goto, in C. 😊

https://github.com/quixadhal/wileymud/blob/master/src/convert/parse_wiley.c#L564

Note that this only works because the loop counter variables are outside the loop’s scope, so they can be fiddled with.

But yes, it’s not normally a thing you really WANT to use, but it’s not as evil as people seem to think.  I think people just got sick of reading BASIC without having it printed on fanfold paper. 😉

Sent from Mail for Windows 10

From: Raymond Jennings
Sent: Monday, February 13, 2017 18:03
To: All about DGD and Hydra
Subject: Re: [DGD] Scope call syntax

I think "goto" became a reserved word or something at some point...but yes,
unless you're developing for the linux kernel or otherwise know what you're
doing (ducks a tomato), you should avoid goto like the plague IMO.

Is it used in Hydra?

*looks at dworkin*

On Mon, Feb 13, 2017 at 2:42 PM, <bart at wotf.org> wrote:

> On Mon, 13 Feb 2017 15:13:30 -0600, Blain wrote
> > I realized after I hit send that I'm segfaulting because I'm within
> > unlimited stack rlimits. :)  I guess I should load user-made subdomains
> > after a callout from initd's create().
>
> That seems like a good idea. In general, running with unlimited stack or
> ticks
> is a bad idea (tm), and will indeed cause a segfault on infinite recursion.
> Limiting the stack size will prevent that.
>
> Its there for if you know what you are doing, but you are on your own when
> running with unlimited ticks or stack.
>
> >
> > On Mon, Feb 13, 2017 at 3:10 PM, Blain <blain20 at gmail.com> wrote:
> >
> > > I have this bad habit of letting up on the SHIFT key while typing "::"
> and
> > > doing "mylib:;func()".  A few times, it's actually caused (or seemed to
> > > cause) a segfault.
>
> According to comp/parser.y its an identifier to be used with goto
> statements.
> Funny, thats also what I expected it to be from the behavior and syntax,
> but
> had to look at the source to confirm because
>
> goto??
>
> iirc there is no goto statement ;-)
>
> Bart.
> --
> http://www.flickr.com/photos/mrobjective/
> http://www.om-d.org/
>
> ____________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd
____________________________________________
https://mail.dworkin.nl/mailman/listinfo/dgd




More information about the DGD mailing list