logoalt Hacker News

gavinraylast Sunday at 9:17 PM2 repliesview on HN

That's not true, Spark's entire query engine relies on use of runtime codegen via macros/quasi quotes

Look up the architecture of Catalyst + Tungsten

https://www.databricks.com/glossary/catalyst-optimizer


Replies

still_grokkinglast Tuesday at 9:55 PM

Scala 2's macros are compile time constructs. There is no runtime code generation / staging.

Scala 3's macros support staged compilation, so you can have macros which create code in later stages at runtime.

https://docs.scala-lang.org/scala3/reference/metaprogramming...

lmmlast Monday at 1:10 AM

Catalyst uses runtime codegen, sure, but the OP wasn't using that.