What if we decide that adding IP literals to the language isn't worth the complexity?
In practice, "add a new language feature" isn't a real solution for programmers who need to get the job done. Static type systems always have limitations. You need to be able to circumvent the type system if it isn't expressive enough for your use case.
Comments
What if we decide that adding IP literals to the language isn't worth the complexity?
In practice, "add a new language feature" isn't a real solution for programmers who need to get the job done. Static type systems always have limitations. You need to be able to circumvent the type system if it isn't expressive enough for your use case.
Sure - you need casts or a similar feature. You don't need standard library methods that do casts, though, and having them invites trouble IMO.
Library methods are preferable to added language complexity.
You need the language functionality of casting anyway, no? Best that there's one and only one way to step around the type system.
No, you need pattern matching, which does not offer a convenient way to write Option.get().