OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office-formula message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [office-formula] Our next adventure: Types and conversions




I noted one option about logical:
> > A. Logical is REQUIRED to be distinct from Number.
> >     Inconsistent with OOo, Lotus 1-2-3, & many others.
robert_weir@us.ibm.com wrote:
> How about A, but allow automatic conversion to Number type?  I believe 
> this is different from C, in that the conversion from Number to 
> Logical would not be automatic. 
I think that would be one of the sub-options of A
(A1: auto-convert, A2: do not auto-convert).  The current
implementations that have distinct logical types (Excel, Gnumeric,
SheetToGo, and probably others) all do auto-conversion
if the expected type is Number.

> Generally I'd rather give an error than to do something which has a 
> good chance of being wrong.  We've come a long way since spreadsheets 
> first came about.  Back then we programmed in assembler, and maybe the 
> old C before prototypes, when everything looked like an int.  Now 
> we've generally learned that strict typechecking is often a good 
> thing.  But this view is not universally held.  What makes sense for a 
> spreadsheet which is used by non-programmers?  We want them to avoid 
> the common mistakes, but we don't want to force them to work hard at it.
>
> So, auto-conversion to text in the general case is dangerous, and I 
> don't mind forcing the user to invoke it specifically where needed, 
> perhaps specifying a fixed locale, or defaulting to the current 
> runtime locale.
An interesting variant of the "mixed" idea (E) would be to set some property
"what to do for numeric conversion" -- probably at the sheet level.
Then you get to choose.  But again, almost nobody does that today (to my 
knowledge).
Actually, if you set Excel to have Lotus 1-2-3-equal semantics, I think 
it'll do
the "always convert to 0", but that's an-all-or-nothing setting (it sets 
other
semantics besides this conversion.


> So, I think I'm suggesting E, without A1 and without A2.  So, an error 
> for a naked use of text in the context of a number,  but allow 
> Value(text;locale) and value(text) to avoid the error.
Alrighty.  This is incompatible with many spreadsheet data files, though --
since many implementations DO perform the automatic conversion.

Oh, I just realized.. another option:
F: Like E (multiple options), but "deprecate" some of the options for 
version 1.0.

--- David A. Wheeler



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]