Can a program depend on a library during compilation but not runtime?

前端 未结 10 1773
深忆病人
深忆病人 2020-11-30 18:18

I understand the difference between runtime and compile-time and how to differentiate between the two, but I just don\'t see the need to make a distinction between compile-t

10条回答
  •  暖寄归人
    2020-11-30 18:31

    Usually, the static dependencies graph is a sub-graph of the dynamic one, see e.g. this blog entry from the author of NDepend.

    That said, there are some exceptions, mainly dependencies that add compiler-support, which becomes invisible at runtime. For instance for code generation as via Lombok or additional checks as via the (pluggable type-)Checker Framework.

提交回复
热议问题