(j3.2006) Public Comment J32033

Michael Ingrassia michaeli
Tue Jul 8 20:32:57 EDT 2008

To: J3
From: Michael Ingrassia
Subject: Public Comment J32033
Date: 2008 July 08

Commenter's Subject was "LEADZ and TRAILZ"

The intrinsic functions LEADZ and TRAILZ should be called
LEFTZ and RIGHTZ respectively.

It's true that if you look far enough you can find uses of
"lead" and "trail" that conform to the meaning you intend in
the present proposed document.  However, you don't have to
look far afield to find uses that aren't consistent with
your intent.  In fact, the description of TRANSFER talks
about the "leading parts" of source values and results.  If
I look at actual implementations that support more than one
INTEGER KIND, I find no compilers available to me where those
"leading parts" aren't the least significant parts.

You don't have to look afield at all to find "left" and
"right" used in the sense I propose.  In fact, many new
intrinsics in the F2008 document (shifts and masks) use
the terms quite consistently.  The BIT  model also defines
the left bits to be the most significant and the right to
be the least significant.  I've never seen anyone use
"left" and "right", with respect to the bits of a number,

Aside from the issue of clarity, there are no other criteria
in which the two naming conventions differ.  They even
require the same number of characters to write out.  The
most mnemonic should be the naming convention chosen.


More information about the J3 mailing list