implicit 4 • Explicit fields are possible too: class point2D(xc, yc) { 2 method x { xc } method y { yc } 4 method length { (x ∗ x + y ∗ y).sqrt } } Figure 1: A simple immutable point object in Grace. Note that there are no explicit fields; instead, the methods x and y refer to (and thus capture) the parameters of the class. successor function in a continuation-passing style. When the stack fills up, an exception-handler (the trampoline) restarts the computation. They report that the function-calling tech- nique introduces far more overhead (250%) than the case + continue technique (50%) [Ibid., Fig 13]. They do not com- ”u 2 fu 4 6 8 } 10 ”u fu Figure 1: A simple immutable point object in Grace. Note that there are no explicit fields; instead, the methods x and y refer to (and thus capture) the parameters of the class. method point2D(xc, yc) { 2 object { method x { xc } 4 method y { yc } method length { (x ∗ x + y ∗ y).sqrt } 6 } } Figure 2: A simple immutable point object in Grace. Note that there are no explicit fields; instead, the methods x and y refer to (and thus capture) the parameters of the class. class point2D(xc, yc) { 2 def x is public = xc def y is public = yc 4 method length { (x ∗ x + y ∗ y).sqrt } } Figure 3: A simple immutable point object in Grace. Note that there are no explicit fields; instead, the methods x and y refer to (and thus capture) the 8 } 2. Start show enco illus cons tions data, tions the o In the c =