Forum: IronRuby Code Review: RubyClrInterop06

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F983f0c990cba2fe743ef62a975ec99c?d=identicon&s=25 Curt Hagenlocher (Guest)
on 2008-11-25 00:23
(Received via mailing list)
Attachment: RubyClrInterop06.diff (10 KB)
tfpt review "/shelveset:RubyClrInterop06;REDMOND\curth"
Comment  :
Create constructors on generated types that match each base class
constructor
Allocator logic not yet updated to use new constructors
Cb51033949ffccd982ae32c9f890f25a?d=identicon&s=25 Tomas Matousek (Guest)
on 2008-11-25 01:04
(Received via mailing list)
In DefineConstructors, newParams seems to be unnecessarily copied.
Wouldn't it be better to do:

Type[] newParams;
Type[] baseParams = baseCtor.GetParameters();

if (has ruby class) {
  newParams = baseParams;
} if (is serializer) {
  newParams = baseParams;
} else {
  ...
  newPrams = ArrayUtils.Insert(typeof(RubyClass), baseParams);
}

?

I would also split this method to multiple pieces, seems too big
already.

Other than that, looks good!

Tomas
F983f0c990cba2fe743ef62a975ec99c?d=identicon&s=25 Curt Hagenlocher (Guest)
on 2008-11-25 02:47
(Received via mailing list)
Unfortunately, GetParameters() doesn't return a type array -- it returns
a ParameterInfo array.  Here we see the evil of "var" -- it hides the
actual type :).

I'll look for opportunities to split the method;
Cb51033949ffccd982ae32c9f890f25a?d=identicon&s=25 Tomas Matousek (Guest)
on 2008-11-25 02:54
(Received via mailing list)
Alright then :)
This topic is locked and can not be replied to.