|
|
Something like: #define max(x,y) ((x) < (y) ? (y) : (x)). Or maybe: #define max(x,y) ((x) >= (y) ? (x) : (y)). Something like: #define max(x,y) ((x) < (y) ? (y) : (x)). Or maybe: #define max(x,y) ((x) >= (y) ? (x) : (y)). Defined in java.util.Collections as generic function. Throws ClassCastException or NoSuchElementException.
Defined in java.util.Collections as generic function. Scheme: (define (max . a) (if (null? a) (error) (max-list a)). Scheme: (define (max . a) (if (null? a) (error) (max-list a)). Unexpected behavior compared to “native” concept. C: if (x = 0) y = max(f(), x); Zeroes x, calls f twice.
C++: object.GetBounds(&rect); Exposes two addresses. Abstraction penalty, inefficiency in generated code. When (d/'dvar'('expr')) where BeginsWithD(dvar) then .. Function MultiplyAdd(A, B, C : matrix) return matrix. Function Add (A, B : array) return array written A+B.
- Pages: 59
- Size: 4.5 MB
- Date: 2012-03-11 03:46:00
Rating of Programming language concepts 39962: 5 out of 5 by HQ Books
|