08-247r1 To: J3 From: Dan Nagle Subject: Public Comment J32033 Date: 2008 August 12 ---------------------------------------------------------------------- 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, differently. 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. ---------------------------------------------------------------------- J3's Response: The intrinsic functions LEADZ and TRAILZ were proposed for Fortran 2008 by work item RU-005 which proposed standardizing various functions from HPF. The work item was incorporated into work item J3-047 that introduced other bit manipulation intrinsic functions. The names of LEADZ and TRAILZ were adopted from the HPF specification. A central purpose of the proposal was to standardize existing practice. Changing the names of these functions would circumvent that purpose. Therefore, we prefer to leave the names of these functions as currently specified in the draft.