[om] RIACA OpenMath Library 2.0 RC3

Manfred N. Riem mriem at manorrock.org
Thu Jan 13 15:58:01 CET 2005


Hi Manolis,

Something of that sort is already implemented in the library,
It is called getType and returns a String for the type of object
You are passing.

Kind regards,
Manfred N. Riem
mriem at manorrock.org
http://www.manorrock.org/ 

> -----Original Message-----
> From: owner-om at openmath.org [mailto:owner-om at openmath.org] On 
> Behalf Of Manolis Mavrikis
> Sent: Thursday, January 13, 2005 3:19 AM
> To: om at openmath.org
> Subject: Re: [om] RIACA OpenMath Library 2.0 RC3
> 
> Manfred,
> 
>     hi (and happy new year by the way)
> 
>     I #ve been using the RIACA library for WaLLiS to handle 
> the OpenMath objects there but now I am also writing an 
> open-source support for OpenMath for MathQTI (the extension 
> of QTI that I talked to you during the meeting in Augsburg). 
> 
>     I have a suggestion that occured to me when I in my code 
> I often have to explicitly distinguish between OMI, OMSTR and 
> OMF when it comes to evaluation. So for example, I have an 
> arithmetic expression evaluator and  the code was really 
> complicated because of that. Therefore I have written an 
> extension of the main OMObject that has one extra method 
> getValue that checks the object's type and returns an object 
> (Integer, String, Double) accordingly or null if it doesn't 
> make sense. 
> Unfortunately, this is not reusable at all and looks a bit 
> hacky. So if someone else uses my ArithmeticEvaluator they 
> will get this ExtOMOBject as a result. Of course it is 
> convertable to an OMOBject but it's not so convenient 
> (programming-wise) . I was thinking that perhaps it makes 
> sense to add this method (even if it is not implemented) to 
> the main OMObject or just implement it for OMI, OMF, OMSTR 
> (or for the objects that actually makes sense) in order to 
> have a common way of getting the value of these objects.
>    
>     Please let me know what you think and if you think it 
> would be possible to include such a thing in RC3.
> 
>     Thanks,
> 
> Manolis
> --
> om at openmath.org  -  general discussion on OpenMath Post 
> public announcements to om-announce at openmath.org Automatic 
> list maintenance software at majordomo at openmath.org Mail 
> om-owner at openmath.org for assistance with any problems
> 

--
om at openmath.org  -  general discussion on OpenMath
Post public announcements to om-announce at openmath.org
Automatic list maintenance software at majordomo at openmath.org
Mail om-owner at openmath.org for assistance with any problems



More information about the Om mailing list