When is `eval` in Ruby justified?

后端 未结 8 1574
太阳男子
太阳男子 2020-11-27 18:14

\"Is \'eval\' supposed to be nasty?\" inspired this one:

Mostly everybody agrees that eval is bad, and in most cases there is more elegant/safer replace

8条回答
  •  無奈伤痛
    2020-11-27 19:04

    IMO mostly for Domain Specific Languages.

    "Evaluation Options in Ruby" is an article by Jay Fields about it on InfoQ.

提交回复
热议问题