News for hackers. Stuff that matters.
Re:Tbox: A GLib-like cross-platform C library by Crinus on Friday April 12, 2019 @10:39AM (#19645167)
Yes, that is what i meant with "inline variables". IMO this is usually a sign of code that is too long to be readable and if you really need that you should either split the function to make it more readable or, if that cannot be done, enclose the affected code in their own brackets (with a comment that makes it easy to distinguish). Brackets also make sure that the variable wont "outlive" its context (although again that is a sign of code that is too long).

Of course that is my opinion (and i'm generalizing of course), but that comes from my experience with working with others' code.

Re:Tbox: A GLib-like cross-platform C library by waruqi on Friday April 12, 2019 @10:53AM (#19645271)
Even if the function code is very short, I still like to define and declare variables nearby.

Unless a function has only two lines of code.

Re:Tbox: A GLib-like cross-platform C library by Crinus on Friday April 12, 2019 @11:20AM (#19645562)
Right, that is your style, but i wouldn't call that "too many grammar restrictions" :-).
Re:Tbox: A GLib-like cross-platform C library by WoodenChair on Friday April 12, 2019 @11:43AM (#19645820)
It's too many grammar restrictions for this person. That's obviously what's implied by the person's original comment.