User loginNavigation |
Library which provides unification of "Type Classes" in Java?Hello LtU, Please excuse me if I get my terms wrong, not a type system expert in any way. Since I don't really know what I'm talking about and what details are relevant I'll try to keep this short. I think it's best to discuss this and I'll come up with the details during the discussion. I want to "map" different "type classes" into a unified system. I understand there is no such thing as a universal type system, so I'm looking for something pragmatic. For example, I could write a class Person { String name; int age; } Would become something like:
Similarly, I could combine an XML document <person age="23" name="Meh"/> with a list of named & typed XPath expressions ("age", int, /person/@age) ("name", String, /person/@name) and view that as a similar Map. Another example would be a query on a database of similar form. I'd then like to have operations such as:
It's important that I can dynamically walk (incrementally) the structure of a type and build a user interface on that. Finally I'd like to (structurally) check equality of two types. Currently I'm trying to write this myself but there are lots of details that make this rather complex. For example, efficiently dealing with values from derived types (obtained from slice/combine operations), etc. Is there any (Java) library that does what I'm looking for? Does this sort of thing have a name? Thanks a lot for your input! Jelle. By Jelle Herold at 2009-11-27 12:19 | LtU Forum | previous forum topic | next forum topic | other blogs | 7004 reads
|
Browse archives
Active forum topics |
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 19 hours ago
49 weeks 2 days ago
50 weeks 6 days ago
50 weeks 6 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago