Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by KingMob

1 day ago

This is true, but thunks carry overhead that macros don't in this case.

2 comments

KingMob

Reply

gf000  1 day ago

Well, if we have a compiler that sees a constant value, it can completely optimize out one branch. But it of course depends on the semantics of the language.

But yeah you are right in case of a naive compiler.

BeetleB  1 day ago

And I know people will think I'm crazy, but thunks are harder to read.

(And I have trouble reading macros).

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities