On Thursday, 26 April 2012 at 10:50:49 UTC, David wrote:
Am 26.04.2012 07:55, schrieb Era Scarecrow:
Associative arrays?
C++:
#include <map>
#include <string>
map<string, string> m;
Java:
import java.util.*;
Map<String, String> map = new HashMap<String, String>();
D:
string[string] map
(Don't know the other two... sorry)
--
Python:
map = dict() # or
map = {}
I think that many D powerful features are also easily done in
Python or have easy to use equivalents, thanks to built-in
dictionaries, list comprehensions, eval, etc. and so many
available libraries. Albeit at the price of a sloooow execution
comparing to D (unless you can utilize native extensions).