Thanks Brent.

# #    Does Parrot have garbage collection?

# Not yet, but it will.

When it does, I'd ask that there be some sort of option on what type of
garbage collection is used. This is because different methods of garbage
collection have very different characteristics.

For example, reference counting can't handle circular references and the
garbage collector therefore leaks memory. Mark and Sweep is not 100%
deterministic and there is no way to know when or if a garbage collected
object will have it destructor executed. This is a big reason why Java has
a "finally" keyword, so the programmer can execute code that would normally
go in a destructor in a 100% deterministic language.

I have a garbage collector written in C++ that handles circular references,
is 100% deterministic, and is fast. When it comes time to implement garbage
collection in Parrot, I'd be happy to provide the source if the Parrot
community feels it'd be worthwhile. I currently own the copyright, but have
no problem making it open source.

Dave



                                                                                       
                            
                    "Brent Dax"                                                        
                            
                    <brentdax@cpan       To:     <[EMAIL PROTECTED]>, 
<[EMAIL PROTECTED]>              
                    .org>                cc:                                           
                            
                                         Subject:     RE: How Powerful Is Parrot?      
                            
                    01/24/02 03:35                                                     
                            
                    PM                                                                 
                            
                                                                                       
                            
                                                                                       
                            




[EMAIL PROTECTED]:
# I've been watching the Parrot development with interest and have a few
# questions about Parrots capabilities.
#
#    Will Parrot support templates (also known as generics)?

If you mean like C++ templates, then the answer is that it's up to the
language.  There won't be anything in Parrot that will prevent it.

#    Will Parrot support operator overloading?

Yup, that's what vtables are all about.  At the Parrot level, you just
overlaod the 'add' vtable entry (and its variants) to implement +; at
the language level you do whatever you want.

#    Do Parrot classes have constructors and destructors?

Yes.

#    Does Parrot have garbage collection?

Not yet, but it will.

#    When a Parrot class is garbage collected or otherwise
# destroyed, is its
#    destructor executed? If so, when? In other words, is
# object destruction
#    100% deterministic in Parrot?

Depends on the language, but Parrot will support deterministic
destruction.

#    Does Parrot memory allocation support placement? In other
# words, can I
#    supply a Parrot memory allocation routine with the address
# of a variable
#    and the desired size to allocate and expect Parrot to
# allocate a block
#    of the given size starting at the address I provided?

Dunno, that's not my department.

#    How hard would it be to implement memory pools of objects
# in Parrot?

.....

#    Does Parrot support threads?

Not yet, but it will.

#    Does Parrot support exceptions?

Not yet, but it will.

#    Can I invoke routines written in other languages, such as
# C or C++, from
#    Parrot?

Yes--you'll just have to write opcodes to wrap them.

# Thanks in advance for your help.

You're quite welcome.

--Brent Dax
[EMAIL PROTECTED]
Parrot Configure pumpking and regex hacker

<obra> mmmm. hawt sysadmin chx0rs
<lathos> This is sad. I know of *a* hawt sysamin chx0r.
<obra> I know more than a few.
<lathos> obra: There are two? Are you sure it's not the same one?




Reply via email to