Because with a mapping there is no control that you're actually sending the correct data. Using a mapping with some construct that enforces entry names might work but I don't see the benefit. Using a data class works too, but again, what I like about named parameters is that you keep the simplicity (in the method) of normal parameters - there's no difference. Using mapping/object would make it obvious you're using a mapping or an object. :)
/ David Hedbor
Previous text:
2003-03-07 00:24: Subject: syntax dreams (was: negative indices in array ranges)
why not just use a mapping for that?
ok, you can't control what elements are used in a mapping, but that would be something i'd like to see:
mapping("foo":string,"bar":int,"baz":array) gazong;
meaning that this mapping may only have the listed keys with the given types.
greetings, martin.
/ Brevbäraren