I've thought about using hashes, though I haven't tried it yet. I'll let you
know!
Here is the interpreter (and language) I'm talking about:
[https://github.com/arturo-lang/arturo](https://github.com/arturo-lang/arturo)
If you have less than 65k values (2^16) just use Nim sets.
import strformat
type RuntimeTag = enum
SV # stringValue
IV # integerValue
AV # arrayValue
type AllowedInput = set[RuntimeTag]
proc validate(x: RuntimeTag, req: AllowedInput)
Multiple dispatch. Maybe you can create a hash signature for each combination
of arguments. Then req becomes a hash set or a dict depending on your design.
_(I 've also posted the following on SO, but I guess it's a more Nim-specific
question)_
**Before saying anything, please let me make it clear that this question is
part of my work on an interpreter - and has nothing to do with validating a Nim
proc 's arguments.**
Let's say we have an enum of