DL == David Leeper [EMAIL PROTECTED] writes:
DL If I know what I want to destroy
Thanks to everyone for their information on Parrot. A couple more questions
have come to mind.
1) Does Parrot support multiple inheritance?
2) Does Parrot support stack variables or is everything allocated on the
heap?
Thanks again.
Dave
I don't have a specific proposal at the moment, but would invite
others to think creatively about ways to minimize cpp pollution while
still keeping the source readable and maintainable.
One possibility would be to change code like this
#define XYZ 123
to this...
namespace _PARROT
This requires the use of C++, rather than C.
See the FAQ.
Where would the FAQ be?
Dave
Simon Cozens
From what I've seen, supporting both garbage collection and true stack
variables is a difficult task.
Why is that?
Because stack variables can refer to heap variables and heap variables can
refer to stack variables. The garbage collector needs to be smart enough to
handle all cases
Thanks for the nice example, except I understand the issue you
are speaking of, I was basically asking what parts of it do you think
are more difficult to implement than any other major construct?
I believe the main difficulty comes from heading into uncharted waters. For
example, once
Parrot supports deterministic destruction at the language level. If your
language wants 'o' to be destroyed at the exit from f2(), then 'o' will
be
destroyed in whatever manner MyClass destruction means to your language.
Resources allocated strictly by the internal representation
That is exactly the case for C++. In your above code f1(), the C++
compiler
already (behind the scene) inserts finally block for o destructor. That
is why the destructor of stack allocated objects is called even when
exception
happens. The only difference is that the memory deallocation is
In neither case do you have any control over the order that memory is
compacted, or dead objects with destructors have their destructors
called. If you must force some sort of order you need to do so within
the objects destructor. Alternately if your program knows what order
objects should
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)?
Will Parrot support operator overloading?
Do Parrot classes have constructors and destructors?
Does Parrot have garbage
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,
11 matches
Mail list logo