[Oberon] How to mimic an associative array

Jan Verhoeven jan at verhoeven272.nl
Thu Dec 2 18:13:56 CET 2010


> FORM[name]="Duke"
> FORM[age]=63

That's easy.

CONST	name = 0;
	age = 1;
	sex = 2;
	address = 3;

and then just index as you wish.

> Associative array functionality is built into Perl, so we never had
> to deal with the implementation details. I would have though that
> after all these years, Oberon would have had a module kicking around
> that offered the same functionality. 

Oberon development has halted many years ago.

Also, it's hard to express the associative thingy in an EBNF formula. 
Perl, Python, Tcl. These are scripting tools for quick and dirty scripts 
that are needed today. Not tomorrow anymore. Then a new one is needed.

Unfortunately the world has accepted scripting tools as a programming 
environment. Eating up many processor cycles. Eating up lots of energy. 
Killing the icebears in your back yard. :o)

-- 
Met vriendelijke groeten,

Jan Verhoeven
http://www.verhoeven272.nl



More information about the Oberon mailing list