logo       

Re: Data_Make_Struct Considered Dangerous?: msg#01216

lang.ruby.general

Subject: Re: Data_Make_Struct Considered Dangerous?

>>>>> "W" == William Djaja Tjokroaminata <billtj@xxxxxxxxxxxxxx> writes:

W> Well, I don't like to have "ptr->data2 = NULL" simply because I usually
W> use NULL for pointers and currently VALUE is unsigned long. Also (see
W> below), I don't like to make mark functions too complicated, because they
W> are pure Ruby overhead.

Please be serious, this just add a test

if (ptr->data2) rb_gc_mark(ptr->data2);

W> Therefore, the statements above are consistent with the principle of
W> staying away from Ruby as much as possible. There is the Ruby way, there
W> is the C way, and there is the Ruby-C way. :)

You have just learned that you don't know how to use the ruby API, and
perhaps ruby is not appropriate for your job (I've never understood what
you're trying to do).

Personnaly, when I use GA they are written in C and not in ruby, because
my simulations can run more than a week.

But I'll never say the stupid thing that you've said, because I've tried
*to learn* the ruby API before using it, something that apparently you
have forgotten to do.



Guy Decoux



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise