- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Re: XML without parentheses unimplemented?
Thu, 2009-02-19, 00:32
Miles Sabin wrote:
>
> On Wed, Feb 18, 2009 at 11:17 PM, Silvio Bierman
> wrote:
>> When I put XML in a Scala source the elements are underlined in red and
>> the
>> flyover warning message is "XML without parentheses unimplemented".
>>
>> When I ignore the warning and simply run the program it works just as
>> expected. It is a bogus warning.
>>
>> Am is missing something or can we simply get rid of the warning? I plan
>> to
>> use XML extensively and really dislike the idea of either having to put
>> all
>> XML inside parentheses or see my code light up like a christmas tree.
>
> The warning is excessively conservative. There are issues with
> unparenthesized XML in the Eclipse plugin (all versions) with can be
> cured by adding paraentheses, so for now my recommendation would be to
> first try without (and ignore the warnings) and fall back to adding
> parentheses if you have difficulties.
>
> Cheers,
>
>
> Miles
>
Thu, 2009-02-19, 01:07
#2
Re: XML without parentheses unimplemented?
I am no expert on the subject by any means. However, I have been testing with
all kinds of constructs combining XML and embedded blocks and have not yet
run into any issues.
I am quite excited about the possibilities this offers. I write lots of code
emitting proprietary XML messages and this wil greatly improve readability
and reduce complexity.
I am curious in what way the issues you mention would manifest themselves.
If the issues could not be overlooked (compile errors) then I would prefer
to loose the warning. If it would result in subtle runtime issues (bad XML
being emitted) then it is something else.
Is it possible to recognize XML constructs where the issues might arise and
only issue the warning then? A generic warning on all XML elements that
should routinely be neglected seems pointless to me.
Silvio
On Wed, Feb 18, 2009 at 11:31 PM, Silvio Bierman
wrote:
> Fair enough. How common are these issues? Could you elaborate?
>
> Ignoring one warning highlight is one thing. Having every XML element
> highlighted is another...
I'm really not sure. It'd help me enormously if you could provide
feedback on this. Obviously the ultimate goal is to get XML support
right, but I'm open to the suggestion that in the interim the warning
is doing more harm than good.
Cheers,
Miles