Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.4
-
None
-
None
Description
An Option can have a type (e.g. String, Number, ...) but this type can not automatically be inferred later since Option is not generic.
It would be usefull to add a generic to the Option so the type can be inferred like Option<String>, Option<Number> and so on.
The CommandLine can then have an
<T> getParsedOptionValue(Option<T> opt)
method so type-safe fetching of Option values is possible without any (optimistic) casting or typechecking is involved.