[Tutor] a puzzle about -3**2 vs (-3)**2

D Wyatt fiberfolly at gmail.com
Fri Jul 31 19:08:52 CEST 2015


<snip>
>
> He is quite within his rights to do that. It's his language after all.
> Some languages solve these problems by not permitting infix notation,
> so in Lisp for example
>
> (3 - 5)
>
> is illegal, you need to do
>
> (- 3 5)
>
> It looks odd to us but that's not the point, its how the language works.
> You learn to get used to it. Most languages have some idiosyncrasies like
> this.
>
> HTH
>
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> http://www.amazon.com/author/alan_gauld
> Follow my photo-blog on Flickr at:
> http://www.flickr.com/photos/alangauldphotos
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor

Yes, I understand that the creator of the language can make it work
however he wants, but I was really hoping for a logical answer.  Just
because 'that's the way it is' kind of sucks and will make it more
difficult to remember.

-- 
Deb Wyatt in WA


More information about the Tutor mailing list