"throw new ArrayIndexOutOfBoundsException(..." doesn't look like the
mathematics in any course I took. But then I only have a bachelors in
mathematics.
Your plaint demonstrates only that your bachelors in
mathematics doesn't cover all of mathematics.
The statement you give is an
expression in a Java-ish mathematical notation. In ordinary algebraic
notations, scalar multiplication may be denoted by an infix centered dot •,
⋅, or ·, by a centered oblique cross × or ⊗, or by
adjacency (iff at least one of the multiplicand and multiplier are non-numeric
symbols). In most programming notations, scalar multiplication is denoted by an
asterisk * (some use ×, but only when it's available in the character set
the notation is designed for). In the notations of other mathematical
fields (oops: field is a term of art in math) areas, ·
and × have different meanings, like inner product and matrix
product.
Programming is largely based on recursive function theory, applied
to full integer subsets, other domains which can be mapped onto them (Boolean,
Character), vectors thereof (arrays, strings), and suchlike.
Your example
shows the use of adjacency to denote function composition (often seen as a
centered circle ○), the omission of parameter bracketing in many cases,
and the use of multi-character names for most everything.
In your example, at
a high level: - throw is a function on the domain of the class
Throwable, with a null range.
- new ArrayIndexOutOfBoundsException(...
is syntactic sugar for new(ArrayIndexOutOfBoundsException).
ArrayIndexOutOfBoundsException(..., where
- new is a function
on the domain of Class (in this case, ArrayIndexOutOfBoundsException) and range
Instance-object-of Class.
- The dot is an infix selector operator between a
Class or instance object and an item symbol (set-of-function or datum). The
entire infix expression denotes, in this case, a set of functions.
- The
composition of a set-of-functions and an actual parameter list (...
denotes application of a member of the set to the actual parameter list. In
particular, the function applied is the one whose formal parameter list
'corresponds to' (per the language definition) the given actual parameter.
- ...
There is a lower level in which the discourse concerns the
state vector of the computation, and how various functions fool around with it:
that's the level where throw is defined with respect to the rest of the
program.
I hope you get the message: programming is a collection of
mathematical disciplines. Just like all such disciplines, programming has a set
of notations for the abstractions that are pertinent to that discipline, so that
the practitioner doesn't have to mess with lower-level abstractions. The lower
levels are still there, just as the Peano foundations for arithmetic are still
there: you can, for the most part, safely ignore them. --- --Bill.
NAL: question the answers, especially mine. [ Reply to This | Parent | # ]
|