Remix.run Logo
▲ fragmede 4 hours ago

Thank you for reminding me that, while Python is slow, there are still reasons to pick it over the alternatives.

▲nvme0n1p1 4 hours ago | parent [-]

Basically all commonly used languages support this nowadays. Even ones you might not expect like C++ and C# have added it. The only major exceptions that come to mind are C and Java.

▲RossBencina 2 hours ago | parent [-]

You have been able to return a struct by value in C since at least C89:

    typedef struct {
        double d;
        int err;
    } Ret;

    Ret foo(void) {
        Ret r = { 0.0, 43};
        return r;
    }

    int main() {
        Ret r = foo();
    }
You can't return a bare fixed-size array though.