Dan --

Dan++

(Dan -- this is going to look familiar to you from prior IRC conversions 
IIRC, but
I thought it could stand repeating in public).

A good set of tree/graph primitives/utilities would be a wonderful 
addition IMO.

And since XML is so common, I'd like to see it treated as a quotelike 
construct
for producing trees (we already have qq for strings and qw for lists, 
etc.):

  my $foo = <bar splee='quux'>
  Hi there! <foo/>
  </bar>

would be one way to point $foo at one of these magical graph 
representations.

If we had such a thing, plus an eval variant that only accepted plain old 
data (safe
to use on untrusted sources because nothing active will be respected), we 
could
pull info in from XML (and other) files easily, too.

The construct in the example above could be parsed at compile time. In 
memory
you've got the tree. If you are compiling to bytecode, the constant 
section could
contain the list of SAX events (or equivalent) required to reproduce it 
(allowing
some lazy possibilities BTW).


Regards,

-- Gregor Purdy




Dan Sugalski <[EMAIL PROTECTED]>
03/26/2003 10:25 AM

 
        To:     [EMAIL PROTECTED]
        cc: 
        Subject:        Perl and *ML


I think that the issue here isn't so much good perl support for XML 
as it is good support for attributed DAGs, something which would be 
of general good use for perl, since the ASTs the parser feeds to the 
compiler will ultimately be DAGs of a sort.

So, rather than jumping on the "XML [insert verb here]!" bandwagon, 
perhaps we'd be better served figuring out what would be useful 
operations and support for/on DAGs and suchlike things?
-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                       teddy bears get drunk



Reply via email to