> 
>> Languages with runtime typing (Java, Python, Ruby, etc.) most naturally
>> represent unions implicitly with runtime typing.
> 
> 
> The bit that bugs me most here is the casting in Java.  We could add helper
> methods in the specific API that would give folks compile-time help, but
> it's weird that the methods would be "getString()" instead of "getFooBar()".
> 
> 

Some sort of change to make Unions cleaner is needed in the Specific API.  I'm 
writing manual wrappers to do this and its ugly -- difficult to encapsulate a 
union with either inheritance or object composition.

Additionally, the generated classes represent a union with Object which seems 
imperfect.  I think be a SpecificRecord or other named type or interface 
(SpecificUnion?).  The object there will always be a type known to Avro, not 
any object.  That is a useful place to put helper methods -- perhaps where 
union type resolution helpers can be placed.  I guess this is related to 
AVRO-266.


>> Maven
> 
> 
> Scott, if you have Maven-fu that you'd like to share, please do!  The goal
> is to be available as easily as possible in as many ways as possible.
> 
I wish I knew more on the packaging side of it.  For other projects that 
publish artifacts to maven, all I have to do is reference them in a pom, then 
15 seconds later in my dev environment I not only get the jar files and runtime 
dependencies, but the javadoc and source code too.  Then, while debugging I can 
step through code into these libraries and see the source, and likewise see all 
the javadoc from the IDE while I'm using the API instead of switching out to a 
browser.

My understanding is that it is as simple as making source and doc jar files and 
publishing them along with the runtime jar file, but I have never done that 
myself.


> -- Philip

Reply via email to