Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> only one finger on your "out" hand

I think Python's way isn't amazing, but it's not too bad either:

    d, r = divmod(100, 3)
It's a bit uglier in C++, but you could make this work:

    int d, r;
    refs(d, r) = divmod(100, 3);
I'm certain there's either a Boost or STL library for this. (I wrote my own for C++98 at one point)

It's clear you like stack based languages, and I certainly admit they can be concise.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: