|
 |
"jr" <cre### [at] gmail com> wrote:
> @ingo. very happily second that. </grin>
>
Ssst, don't tell, but table definitions are type, except type has grown in more
encompassing direction.
- pascal
type a = record
b: integer;
c: char;
end;
- C
struct a {
int b;
char c;
};
- nim
type
A = object
b: int
c: char
- nim
type
RGB = array[5, float]
Pattern = object
pKind: ....
Texture = object
pattern: seq[Pattern]
Material = object
texture: seq[texture]
template rgb*(r, g, b, filter, transmit: float): RGB =
[x, y, z, filter, transmit]
template `r=`*(colour: var RGB, value: float) = colour[0] = value
template `g=` ...
kind off....
another language that may be of interest is Phix http://phix.x10.mx/ where
everything is array based (https://rosettacode.org/wiki/Category:Phix)
ingo
Post a reply to this message
|
 |