I mean function that is only able to do logical and mathematical operations, for example: 3+5<=9, "string"=="string" && (3<9 || 12>3), but not like this a+b<c, "string".length > 3 or calling functions, so the programmer must resolve (by regex or otherwise) all the possible names before it is evaluated ?
edit:
So I found one good reason to use eval() …
Yes, there is a solution: just create a new function object, it has advantage that it does not pollute scope… well it looks definitely safer: https://stackoverflow.com/a/7650148/393087
Yes, I know , this is not what I really wanted but is closer in right direction in terms of safety.