- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Re: Re: Scala XML and attribute reordering
Sun, 2010-12-12, 20:57
On Sun, Dec 12, 2010 at 11:49 AM, Paul Phillips <paulp@improving.org> wrote:
On Sun, Dec 12, 2010 at 11:35:56AM -0800, Silvio Bierman wrote:
> The attribute reordering issue seems extra silly since it looks like
> it is a minor detail like storing them in a HashMap which can not
> preserve ordering. I suspect (without having looked at the actual
> sources) that simply replacing a HashMap with a LinkedHashMap might do
> wonders here.
I could fix it in a matter of minutes. It's not the technical
challenge, but an unwillingness to fade the static. In fact it was
pointedly suggested that someone who didn't love XML the way it's
supposed to be loved (as I obviously do not) shouldn't be working on it.
Seeing as it's unappealing work anyway, I was easily convinced.
When the issue was raised prior to the 2.8 release, the consensus was reached that even though the current XML implementation is less than optimal, the cost of "doing it right" and the inability to find an owner or even get people to agree on stuff meant that the current XML implementation would live on for the foreseeable future.
There are two issues with improving the XML support in Scala: the library and the compiler piece.
The library is easy. Nobody is stopping anyone from stepping up and writing a better library. I know that my XML improvements were happily accepted into the Scala distribution. If someone comes up with a better XML library for Scala, by all means, put it up on Scala-tools.org. If it totally rocks, I'd be willing to use it in Lift instead of the Scala XML library.
The XML constants in the language are the larger issue. But if someone solves #1 first, then this issue should be a smaller hurdle that could initially be solved with a compiler plugin.
With all this being said, representing one of the largest user-bases that relies on Scala's XML library (Lift), it's not so bad for us that it's worth writing a new set of XML classes. Maybe that's true for another constituency, but my guess is that until someone ponies up actual code, we've got what we've got which isn't perfect, but it's serviceable.
--
Paul Phillips | You think you know when you learn, are more sure
Imperfectionist | when you can write, even more when you can teach,
Empiricist | but certain when you can program. -- Alan Perlis
pull his pi pal! |----------* http://www.improving.org/paulp/ *----------
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics