I like the is vs = idea.  I disagree with Paul that this is a price of it
being typeless.  No other whitespace character in LC seems to cause this
behavior.  It's not really true that it's typeless e.g. a blob (even though
technically a blob is a type).  It's just that the typing is implied and
the coercion is also implied.

On Thu, Sep 6, 2018 at 1:52 PM Tom Glod via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I have come across this before .....   I think what I encountered was "" =
> 0
>
> I had to do a workaround, figured it was a a decision based on other engine
> factors.
>
> I can see it being ok in 99% of cases.
>
>
> On Thu, Sep 6, 2018 at 1:25 PM Mike Kerner via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Ignoring the leading or trailing whitespace is weird and
> counterintuitive.
> > If the language was more perfect, I think it would first not ignore the
> > other characters in the string no matter what they look like, then do the
> > implicit type coercion and then the comparison, even though there are
> > definitely use cases where 1≠1.0≠1.0000000000, but those sorts of edge
> > cases perhaps better left documented and not handled.
> > In all cases, where intuition and behavior are not in line, the manual
> > should fill in the gap.
> >
> >
> > On Thu, Sep 6, 2018 at 1:02 PM Mark Waddingham via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> > > On 2018-09-06 18:52, Mike Kerner via use-livecode wrote:
> > > > Right.  If the explanation is clear then it's not an issue (even if
> it
> > > > is a
> > > > little weird - "6.abc"="6.xyz" is false but "6."&CR is "6."&space is
> > > > true)
> > >
> > > Well the explanation can be fixed :)
> > >
> > > Its hard to say whether the language would be better or worse if only
> > > 'strict' numeric strings were considered equal. After all you'd still
> > > have that "1.00000" is "1" is "1.0" is ... which whilst more obvious
> > > perhaps, still means you have to work harder to do strict string
> > > equality checking (or comparison).
> > >
> > > Warmest Regards,
> > >
> > > Mark.
> > >
> > > --
> > > Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
> > > LiveCode: Everyone can create apps
> > >
> > > _______________________________________________
> > > use-livecode mailing list
> > > use-livecode@lists.runrev.com
> > > Please visit this url to subscribe, unsubscribe and manage your
> > > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > >
> >
> >
> > --
> > On the first day, God created the heavens and the Earth
> > On the second day, God created the oceans.
> > On the third day, God put the animals on hold for a few hours,
> >    and did a little diving.
> > And God said, "This is good."
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to