uh I think I missed a std::decay_t<> in there somewhere
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
@calvin would you believe pound-define didn't even occur to me as a possibility

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

@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... 😩

@jon_valdes they may have - C++17 can be a lot more sensible than this :P

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?
Sign in to participate in the conversation

This is a small ship in the fediverse.

The name is borrowed from the mass-produced Macross-class ships in the Macross universe; SDFN-01 Hayase was the first of the line. The ships were designed to scout emigration routes ahead of the Megaroad colonization ship.

More information can be found at the Macross Compendium.

Federation transparency report (2018-11-03)

  • Suspended instances: newjack.city
  • Silenced instances: none
  • Reject media: preteengirls.biz