[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ideas about colon operator syntax (and a patch in the work)
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 1 May 2014 15:31:13 +0200
On Thu, May 1, 2014 at 12:35 PM, Thomas Jericke <tjericke@indel.ch> wrote:
> Do we really wan't to write polynoms as (2 * x) + (4 * (x ^ 2)) + (3 *
> (x^3)) instead of 2 * x + 4 * x^2 + 3 * x^3 ?
I don't want to - because I'm used to these standard operators and
their precedence levels.
Adding another operator that works right-to-left is fine, but I really
cannot see what this colon operator can do that cannot be done by
straightforward code, which we can all read unambiguously.
So I'm with Michael on this one - new cognitive load is only ok if the
user of the language gets an immediate increase in expressiveness.
(And leaving out explicit () doesn't feel intuitive to me - Lua is
not Pascal or Eiffel.)