• palordrolap@fedia.io
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    4 hours ago

    In most languages evals are, in a way, like gotos. You should aim to write your code with none at all, but they’re nice to have in a pinch if the project takes a turn and a rewrite might take time you don’t have. Just don’t put user-supplied strings through one and you’ll be fine. Probably.

    Also, in at least one language I can think of, there’s a variant of eval that works a lot like try in other languages. As such, I don’t think those should be considered the same thing.