[Perl 6 Microgrant] C++ Cleanup Adjustments

speters on 2007-04-27T12:56:48

The other night, I sent in a large patch to cleanup some additional implicit void pointer casts that C++ simply cannot live with. particle gave me a great idea on IRC, however, for cleaning up some of the redundancy of one set of cleanups with a macro. So, its time to re-patch with some additional cleanups for good measure. More on this patch later today.


Refactoring time...

speters on 2007-04-27T16:13:50

It looks like someone applied that patch. My next step was going to be to refactor and cleanup after the fact, so, I'll just add this to the list as well.

Re:Refactoring time...

chromatic on 2007-04-27T17:14:22

I stay up late to apply your patches. It's worth it.

Macros and perl

drhyde on 2007-04-30T11:39:10

The perl5 source is a twisty impenetrable maze of macros. I know that macros can be jolly useful when used wisely, but do please be careful not to fall into the same trap!

Re:Macros and perl

speters on 2007-05-03T02:55:05

Oh certainly, I don't plan on making Parrot more obfuscated than it already is ;-).

The macros come in with trying to make Parrots guts easier to understand. malloc() is a typical sore spot. By definition, it returns void * pointers. That's fine, but it causes severe problems in comprehension when people have a function which happens to call malloc() return the void * without casting it to something else. My thoughts are on performing this cleanup by use of macros to avoid the parenthesis hell that usually accompanies properly cast malloc() calls.