Yuriy Tymchuk wrote:
I think that while working with float arithmetic it will be nice to provide something like #~= instead of #closeTo:, and also add #~<, #~<= and so on. But maybe I’m wrong :)

I don't think you'd be able to repurpose #~= to a different meaning.  That way lies madness.  However I do still sometimes find myself thinking "approximately equal" instead of "not equal" when I see "~".   I'd be very tempted by "!=" if it was available, but in reality I'd be worried about compatibility across smalltalk platforms.

cheers -ben

Uko
On 26 Jun 2014, at 13:07, Christophe Demarey <[email protected]> wrote:


Le 26 juin 2014 à 12:46, Nicolas Cellier a écrit :

$! is not classified as a binary character right now, is it?
Of course it's possible but I'd just say why this particular symbol?
It does not look mathematical either. Or do you love C/C++ so much?

Of course not. It is just because it is something widely used but other names could do the stuff like <> or /=

Note that ~= has same meaning in Matlab.

Nice to know we are not totally unique. I came across someone's related query...
http://stackoverflow.com/questions/3865103/why-is-not-equal-represented-by-in-matlab


There are other possibilities like /=  or <> (Fortran 95, ADA), even the long form =/=.

But frankly, I don't buy this kind of change, for the sake of looking like some {} language, making such a deep change is overkill.

Indeed it is a deep change but maybe at least we could have an alias and use it for all new code. At a time, it will be less painful to do this change.
As expressed in another thread, Smalltalk code convention for method naming strategy is intention revealing.
That said, I think ~= is not intention revealing and it will be good to fix or propose a good alternative.


Reply via email to