Helgef wrote: ↑24 Jan 2019, 04:03
Code: Select all
for k, v in { func('msgbox') : 'hello world' }
%k%(v)
Yes. Internally we saw that key name's type may be a reference to an object. yet I don't see any advantages of it. Object reference might be stored in the right field (value) with all its properties ("hello world" string, etc) inside that referenced object.
Look at Python - left side in the assignment is just a string (a unique name), right side is always an object (strings, numbers, lists, dictionaries, functions, whatever). Internally Python might store hashes instead of strings for names.
but your reaction (as in this form of aggressive rejection) does not make you look good.
I'm really sorry - I didn't mean to sound aggressive. When I type fast I forget about manners it seems.
In Java it's called a Map - the Map maps Objects from one datatype to another.
I'm not familiar with Java, but according to Map description I can imagine it as a collection. With unique keys (hashes) to the left and values to the right (mapped value).
What I meant is left side is a key and can be of 1 type only ("string" or hash/address/index - integer, doesn't matter - it just has to be unique for the current namespace/virtual address space/indexed table) and right side is a value (mapping to another object/data type, pointer to an object, literal string, integer, 128-bit MMX register, bit array, etc).