[Mono-list] Mapping PHP and Mono
Miguel de Icaza
02 Feb 2003 18:21:27 -0500
> Second, Are there anythings to consider when mapping objects to base
> types? Ie, mapping a mono integer (which is an object) to a PHP
> integer. Does anyone have opinions as to whether these should be
> directly mapped (faster) or if everything, including base types should
> be objects, and then set's and get's would be overloaded (maps to the ms
> way, but is slow as all hell). Are there anythings to consider so the
> performance degradation would be worthwhile?
Well, integers in .NET are just integers.
C# hides this fact, by using a special operation called "boxing".
Boxing can convert any non-object into an object (it encapsulates it).
So you should be fine just mapping integers directly.