News for hackers. Stuff that matters.
Re:John Carmack on Inlined Code by thomasahle on Saturday September 27, 2014 @04:16AM (#8376444)
Some people like to solve this problem with 'goto's, as in the 'small' subfunction in https://golang.org/src/pkg/math/gamma.go

Personally I'd like to see something like Haskell's "where", to create a scope for private functions in the "B style":

    void largerFunction(void) {
        small1();
        small2();
    } where {
        void small1(void) {
            ...
        }
        void small2(void) {
            ...
        }
    }
Until that becomes possible, we can always just make sufficiently small modules with few public functions.
Re:John Carmack on Inlined Code by Too on Saturday September 27, 2014 @12:26PM (#8377413)
Can be achieved with lambdas or anonymous functions in most languages; c#, c++, javascript, python to name a few :)
Re:John Carmack on Inlined Code by thomasahle on Wednesday October 01, 2014 @02:59PM (#8396879)
Sure, but then you'd have to put the declaration before the function call.