public static void main(String[] args)
{
int appleCount = 10;
System.out.println("You have " + appleCount + " apples");
}
Why would this syntax need to change? You could also have String number = 10.toString();. I'm sure that you realize there is already not a one to one mapping from syntax to code. The for ( String s : strings) is clearly one example of this. So the above example could be swizzled to "Integer.toString(10);" by the compiler.So I don't see why you'd have to change the syntax to support treating primitives as objects in the language but have them as primitives in the run time. Smalltalk does this.. they are called immediate directs.