Is There Anyway to Declare a Function Parameter of Int of Certain Range Like 0...25?

Right now Property Wrapper does not support local variable usage, only member variable. It would be hard to use?

Also, I was hoping for compile time check. A property wrapper would only do runtime check?

I'm worried, that it will only do runtime check :slightly_frowning_face:

1 Like

Right now the only compile time checks available are those special‐cased in the compiler. All the validation methods discussed in this thread have their effect at run time.

However, all mentioned strategies will likely be able to interoperate with compile time evaluation if its design is completed and it passes the Swift review process.

1 Like