One common case that I've encountered: There's no (good) way of going "this is a Comparable<Foo> and a Comparable<Bar>, but not a Compar...
One common case that I've encountered: There's no (good) way of going "this is a Comparable<Foo> and a Comparable<Bar>, but not a Comparable<Baz>" that's detectable at runtime. (Also true with other interfaces.) Especially for trait interfaces. There are also nasty cases where you end up crashing randomly somewhere else in your code at runtime because somewhere something passed a List<Foo> and it expected a List<Bar>, but somewhere in between the type information got lost. Ditto, I find myself wishing to be able to do instanceof T / T[] (that's an array of T) annoyingly often. Look at the mess that is EnumMap for an illustration of why type erasure can be frustrating. The amount of reflection done at runtime for what should be (and is, if you write a non-generic implementation, or if you're using a language that's sane) purely compile-time work is... frustrating. (And while you're at it, the fact that you can even attempt to pass in a non-enum into EnumMap. I thought Java was supposed to try to push such errors into compile time?)
Posted by TheLoneWolfling on Apr 17, 2015, 3:52 AM
Tags
Related issues
- That isn't really relevant for the tool starting the container.
- Why is there no link to the source?
- Something I wonder about in this domain is if this is the fault of the language.
- Namespace pollution is an annoying problem in Rust.
- Currently, no language ports of Timefold Solver are planned.
- I agree with you, almost all .NET code I write is within the .NET framework, yet when I look at C# repos, it's disheartening to see so ma...
Raise real-world problems, find people facing the same issue, and discuss solutions.7,000 issues0 comments
hackernews (Software)
That isn't really relevant for the tool starting the container.
Why is there no link to the source?
Something I wonder about in this domain is if this is the fault of the language.
Namespace pollution is an annoying problem in Rust.
Currently, no language ports of Timefold Solver are planned.
I agree with you, almost all .NET code I write is within the .NET framework, yet when I look at C# repos, it's disheartening to see so ma...
Why is there no simple workaround for this?
I have been using https://github.com/jacktasia/dumb-jump to quickly jump to definitions.
One common case that I've encountered: There's no (good) way of going "this is a Comparable<Foo> and a Comparable<Bar>, but not a Compar...
One common case that I've encountered: There's no (good) way of going "this is a Comparable<Foo> and a Comparable<Bar>, but not a Comparable<Baz>" that's detectable at runtime. (Also true with other interfaces.) Especially for trait interfaces. There are also nasty cases where you end up crashing randomly somewhere else in your code at runtime because somewhere something passed a List<Foo> and it expected a List<Bar>, but somewhere in between the type information got lost. Ditto, I find myself wishing to be able to do instanceof T / T[] (that's an array of T) annoyingly often. Look at the mess that is EnumMap for an illustration of why type erasure can be frustrating. The amount of reflection done at runtime for what should be (and is, if you write a non-generic implementation, or if you're using a language that's sane) purely compile-time work is... frustrating. (And while you're at it, the fact that you can even attempt to pass in a non-enum into EnumMap. I thought Java was supposed to try to push such errors into compile time?)
Comments (0)
No comments yet. Start the discussion.