aviadbd / winter

Zero boilerplate configuration framework
Apache License 2.0
0 stars 0 forks source link

Should re-think Property's design #8

Closed aviadbd closed 9 years ago

aviadbd commented 9 years ago

Currently it allows any instance to be passed into it, while its intention was for primitives (int, double..) and the String/Enum classes.

eztzachi commented 9 years ago

That's true, but the get Value function won't work properly. So we need to think about validation, that's what you meant right?

aviadbd commented 9 years ago

Either validation or a different repesentation for primitives - it doesn't have to be just one Propery class (see the Null class for example of a very specific case)

On Sat, Nov 22, 2014 at 10:38 AM, eztzachi notifications@github.com wrote:

That's true, but the get Value function won't work properly. So we need to think about validation, that's what you meant right?

Reply to this email directly or view it on GitHub: https://github.com/aviadbd/winter/issues/8#issuecomment-64073618

aviadbd commented 9 years ago

As an idea, we can have an enum implement Parameter and each of its values could be a permitted primitive.

On Sat, Nov 22, 2014 at 11:06 AM, Aviad Ben Dov aviad.bendov@gmail.com wrote:

Either validation or a different repesentation for primitives - it doesn't have to be just one Propery class (see the Null class for example of a very specific case) On Sat, Nov 22, 2014 at 10:38 AM, eztzachi notifications@github.com wrote:

That's true, but the get Value function won't work properly. So we need to think about validation, that's what you meant right?

Reply to this email directly or view it on GitHub: https://github.com/aviadbd/winter/issues/8#issuecomment-64073618

eztzachi commented 9 years ago

that's exactly what I was about to offer. I can start working on it

aviadbd commented 9 years ago

Sure. Take the issue and start your branch.

On Sat, Nov 22, 2014 at 12:57 PM, eztzachi notifications@github.com wrote:

that's exactly what I was about to offer. I can start working on it

Reply to this email directly or view it on GitHub: https://github.com/aviadbd/winter/issues/8#issuecomment-64076604