Dave Thomas <Dave / PragmaticProgrammer.com> wrote:
>
>"John van V." <john_van_v / yahoo.com> writes:
>
> > > Do you wish to have an equivalent to Data::Dumper in Ruby?
> >
> > I would be very intested, in fact it would be crucial for perl-ruby 
>migration.
> >
> > Sarathay ( GSAR in CPAN ) wrote the modules about 3 years ago.  He said 
>that
> > performance using perl was terrible, and wrote the XSUB modules now used 
>by
> > everyone.  Maybe you can borrow code, I am sure he wont mind.
> >
> > If/when you complete it, I would be interested in working w/ the C or 
>ruby code
> > to format the dumps into either text or html.
>
>Perhaps an idea would be to make the code that actually formats the
>data pluggable, so that anyone can write a Ruby class that formats the
>dump the way they want (xml, source, etc)

I have before dumped Perl data structures into
equivalent JavaScript ones.  (Parallel data
structures, parallel classes.)  This was very
nice, and it would have been nicer to not have to
roll it myself.

But if it came to a choice between having a
Data::Dumper facility that allowed me to choose
my own formatting output, and a facility that
could figure out the difference between deep
copies and shallow copies...

Cheers,
Ben
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com