14
Danacus
6y

I present to you: The Anonymous Asynchronous Self-Invoking Arrow Function.

(async () => {})();

Comments
  • 3
    What's weird about that?
  • 1
    @inaba I don't know, it looks weird to me, but I like it.
  • 3
    And I present you a segmentation fault
  • 1
    @gitlog Oh, no... Is there even a different between "Segmentation fault" and "Some random error but no one knows what's wrong"?
  • 2
    Oh well... Wait... No await needed to call an async function? 😅
  • 0
    @Ganzalf You can just start them without await, they basically just return a promise
  • 1
    @norman70688 @Danacus executing without awaiting anything feels wrong 😅 Don't judge me but most times I prefer the callback hell.
  • 1
    @Ganzalf sometimes callbacks just make more sense and I have used them a lot in the past: https://reddit.com/r/.... That's what I call a real callback hell :P
  • 1
    @Danacus just looking gives me goosebumps!
  • 1
    I thought JavaScript promises executed as soon as they're instantiated, but I was having some weird experiences using web assembly. Can you console.log in a promise and have it show up?
  • 0
    @beegC0de I don't know about webassembly, but it works with mode and/or babel.
  • 1
    @Danacus there wasn't any exceptions or errors popping up in console until I started awaiting. Maybe I need to fool around with it more.
  • 0
    @beegC0de that sounds odd, I don't really know
Add Comment