Tcl Source Code

View Ticket
Login
Ticket UUID: 1556802
Title: [TIP#274] right associativity for ** operator
Type: Patch Version: TIP Implementation
Submitter: dgp Created on: 2006-09-12 03:18:39
Subsystem: 45. Parsing and Eval Assigned To: dgp
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2006-11-05 10:29:47
Resolution: Accepted Closed By: dgp
    Closed on: 2006-11-05 03:29:47
Description:
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.
User Comments: dgp added on 2006-11-05 10:29:47:
Logged In: YES 
user_id=80530


TIP 274 Accepted.
Patch committed.

dgp added on 2006-09-12 10:18:39:

File Added - 193061: expon.patch

Attachments: