Y
Hacker News
new
|
ask
|
show
|
jobs
by
KingMob
19 days ago
This is true, but thunks carry overhead that macros don't in this case.
2 comments
gf000
19 days 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.
link
BeetleB
18 days ago
And I know people will think I'm crazy, but thunks are harder to read.
(And I have trouble reading macros).
link
But yeah you are right in case of a naive compiler.