Skip to content
Tcl Source Code View Ticket
Login

View Ticket

[TIP#274] right associativity for ** operator

Closed / Accepted1556802fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 years ago
Descriptionplain2006-09-12 03:18:39
David Smith has observed on
the tcl-core mailing list that
left associativity of the **
operator proposed by TIP 123
and implemented in current
devlopment sources of Tcl
is at odds with several other
languages and computing 
environments.

Attached is a patch that changes
** to right associativity.  Here
it is in action:

% expr 2**3**4
2417851639229258349412352

I note that there are zero tests
in the test suite checking the
associativity of **, which I take
as evidence that the original
left-associative implementation choice
wasn't a feature of great importance.
dgpplain2006-09-12 10:18:39
File Added - 193061: expon.patch
andreas_kupries Ticket [1556802fff]: 1 change [History diff]2006-09-29 04:41:03
dkf Ticket [1556802fff]: 1 change [History diff]2006-09-29 15:59:20
dgpplain2006-11-05 10:29:47
Logged In: YES 
user_id=80530


TIP 274 Accepted.
Patch committed.
Log in (anonymous is fine) to add a comment.

Attachments: