For once, I want good integer subtyping!
June 3, 2007 at 6:00 pm | In Java, Programming | Leave a CommentI am using an integer ID in parts of my program, I want to ensure that the ID is an actual ID that I have returned. In a strongly typed language that also has a well fleshed out subtyping system, this would be trivial!
subtype AlbumID is long
The benefit of course would be that I could keep track of my AlbumID types and not have to worry about anything else!
Now the proper Java way is to make a new class called AlbumID that has a single long field and… bleck! I just want compile time checking darnit, I don’t need anything instantiated.
No Comments Yet »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.