What static typing makes difficult

james anderson james.anderson at setf.de
Sat Oct 25 17:45:21 EDT 2003



"Brian McNamara!" wrote:
> 
> mertz at gnosis.cx once said:
> >The package gnosis.xml.objectify takes an XML source, and turns it into
> >a "native" Python object....
> > ...
> >           if parser==DOM and (hasattr(xml_src,'documentElement'): ...
> > ...
>
> I have no chance at a full implementation, but here is a sketch in
> Haskell.  I know that a mere sketch is never as good as a working
> implementation, so I hope someone else will take up the challenge.
> 
> ...
> 
> As far as I can tell, the only "extra scaffolding" is the type class
> ConvertibleToXML.  Each time some new data type comes along which can be
> converted to XML, we add a new instance declaration which shows how.

? would haskell suggest to handle the attribute-based specialization in a
manner similar to the original post, or does it offer some other mechanism?

...




More information about the Python-list mailing list