@ninjawedding I mean, I stick to C99 when I do C shenanigans, and especially avoid C++, so...

maybe some brief explanation would help

small brain: C++: call bar with foo's arguments
big brain: genericize over return and argument types
bright brain: genericize over types and arity
exploding brain: type deduction
cosmic brain: use Ruby

@ninjawedding another one that occurred to me: (void*)foo = bar

@ninjawedding What's even better is that that is only one of the *many* ways to do aliasing in Ruby

@ninjawedding Pretty much, you can go from lexical alias over method-copying with alias_method over method_missing magic up to refinements and/or forwardable stuff

@ninjawedding fuck, for a moment I had a glimmer of hope that the C++ standards committee had done something I'd be interested in. Alas... 😩

I'd guess something along the lines of

auto auto(auto auto) {
return auto(auto);

@aeonofdiscord like seriously :P academically I know that a function has a type but actually really grokking that is going to destroy my world

@ninjawedding honestly std::function + auto + lambdas basically made it a whole new language for me, it's so much easier to express stuff than it used to be

@aeonofdiscord yeah totally!

I still find myself writing out huge amounts of rococo crap (see meme) and then later on someone tells me "uhh why not just do [something way shorter] and then I'm like πŸ˜Άβ€‹ and my world goes :kaboom:​ and I need to audit everything

but I guess that's learning

@ninjawedding @aeonofdiscord honestly "why not just do *way simpler thing*" is like, any time I talk about coding, ever

@ninjawedding Guh, selected another subthread and missed this one where that was the first suggestion...

@Tak yeah it’s kind of amazing how many simple solutions I didn’t even consider :P

when my head gets in one place, it tends to stay there heh

@ninjawedding I was with you up to alias_method. What the heck is that?

@sixohsix me being cheeky and throwing in Ruby :P

others have pointed out that auto foo = bar; is valid and I think that is a much better cosmic brain
@Efi hmm, I remember running all of these through g++ 7.2 - maybe I missed a type-programming thing somewhere?