[ome-devel] findObject problem
Ilya Goldberg
igg at nih.gov
Thu Dec 7 22:15:02 GMT 2006
On Dec 7, 2006, at 1:29 PM, Jeremy Muhlich wrote:
> On Thu, 2006-12-07 at 18:43 +0100, august wrote:
>>> Hi August
>>> Wrapping in an eval isn't really over-kill (brace eval, not
>>> string) -
>>> its the recommended way to catch exceptions.
>
>> oh, ok. I'm no perl expert....just learning it as I go with OME.
>> Somehow, I remember being told that the brace eval actualy starts
>> another perl interpreter, which seems to me like it would be
>> something
>> to avoid.
>
> Brace eval is functionally equivalent to try/catch in Java or C++.
> Don't fear it at all if you are just wrapping some code to catch
> exceptions, there's no performance penalty.
>
> String eval on the other hand IS quite slow, as perl has to recompile
> that code string every time through. It doesn't start another
> interpreter per se, but it's slow. There are certain times when you
> need this, but exception handling isn't one of them.
OME uses string eval internally to generate classes from ST
definitions at run-time. That's why there's no code for all these ST
classes - they're all made on the fly when you want them. The
ability to write self-modifying code is actually the primary (only?)
reason OME was implemented in Perl rather than Java. Just be glad we
didn't go with Lisp. This was MIT after all.
;)
-I
>
>
> -- Jeremy
>
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>
More information about the ome-devel
mailing list