java - Why "int/boolean/..." are primary types which have no "behavior" where type is "behavior specification" -
java - Why "int/boolean/..." are primary types which have no "behavior" where type is "behavior specification" -
from paper: http://www-public.int-evry.fr/~gibson/teaching/csc7322/readingmaterial/wegner87.pdf
it defines type:
type: type behavior specification may used generate instances having behavior.
but found in document: http://www.ccs.neu.edu/home/riccardo/courses/csu370-fa07/lect4.pdf
it says java has:
primitive types: types corresponding primitive values, including int, short, long, byte, char, float, double, , boolean. null type: type of value nullbut "primitive types" values don't have behavior, , null value.
why "type"s? reference same concept "type"?
about "behavior", in current understand, it's variable or entity provides invoke (seems i'm talking object). since type not "object" related languages, i'm not sure "behavior" now.
maybe real question should be: "behavior" mean in definition of "type"?
primitive types , null types "types" because jls specifies them such. jls not provide formal definition of "type" other there 3 types referencetype, primitivetype, , null type [jls 4.1].
it sec paper linked reusing terms defined in jls.
java types
Comments
Post a Comment