JDK-4495744 : Add binary designator for specifying integer values
  • Type: Enhancement
  • Component: specification
  • Sub-Component: language
  • Affected Version: 1.4.0
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2001-08-23
  • Updated: 2006-12-07
  • Resolved: 2006-12-07
Related Reports
Duplicate :  
Relates :  
Description
Name: bsC130419			Date: 08/23/2001


java version "1.3beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3beta-O)
Java(TM) HotSpot Client VM (build 1.3beta-O, mixed mode)


Java continues the C-sytle tradition of octal, hex, and decimal specification
of integers. C and java both lack the ability to specify integer values in
binary.  Some notation like in a form like the hexidecimal specification would
suffice "0b111000".  At present, binary data has to be converted to hex or
octal or decimal which can lead to bugs.
(Review ID: 130557) 
======================================================================

Comments
EVALUATION Sugar I agree, but 5025288 is a more better-written and more general proposal.
07-12-2006

EVALUATION Minor syntactic sugar. Not very important either way - no strong upside or downside. One could consider it in the context of a major upgrade, if there was real demand. ###@###.### 2001-10-23
23-10-2001