Bjarne Soustrup's recommendation on how to do keywords in C++:
FunctionFooParameterObject()Works.
.keyword_parameter1(val1)
.keyword_paraemeter3(val3)
.keyword_parameter5(val5)
.call_it()
Only real hassle is that it is a lot of dang code to write.
Andy "Krazy" Glew is a computer architect, a long time poster on comp.arch ... and an evangelist of collaboration tools such as wikis, calendars, blogs, etc. Plus an occasional commentator on politics, taxes, and policy. Particularly the politics of multi-ethnic societies such as Quebec, my birthplace. Photo credit: http://docs.google.com/View?id=dcxddbtr_23cg5thdfj
FunctionFooParameterObject()Works.
.keyword_parameter1(val1)
.keyword_paraemeter3(val3)
.keyword_parameter5(val5)
.call_it()
index_set = { 1, 2, 3}
array[ index_set ] = 0
index_set = 1, 2, 3 ...rearranging
array[index_set] = random()
array = array[i] where i < 5
index_set = 1, 2, 3 ...
small_index_set = i IN index_set, where i < 5
array[small_index_set] = random()
$OAA{key} # error if more than 1 match?
$OAA{key:1} $OAA{key:2} ... # first match, second match, ...
$OAA{key:#} # number of matches
$OAA{key} = value # replace. error if no match
$OAA{key} = {} # delete - or some other way of indicating droppage
$OAA{key} <<= value # insert just before
$OAA{key} >>= value # insert just after
$OAA{key:*} = ... # replace all occurrences
$OAA{i WHERE $OAA{i} < 2} = ... # replace all occurrencesWe might allow the value to have structure, with fields.
$OAA{rec WHERE $OAA{rec}.age > 10 and $OAA{rec}.weight <70 br="br">$OAA{.age > 10 and .weight <70 blockquote="blockquote">Nothing that you can't do with map here - but the notation may be more pleasant. And compact, pleasant notation matters. (As opposed to compact unpleasant notation.)
Verges on relations.
---
Extend to multi dimensional?
70>70>
bash: syntax error near unexpected token `('terminating .bashrc too early, before all path setup was done.
eval $pathvar=$elem:"$pathval"in some code manipulating the PATH. Had problems with filenames containing special characters like space and ()s. Such fiulenames ae relatively uncommon on *IX, but common on Windows, and Cygwin is both.
eval $pathvar="'$elem'":"'$pathval'"At least I hope it's fixed. What if pathvar has a special character? Nah...
eval SAFE(SAFE(SAFE($pathvar)))=SAFE(SAFE(SAFE($elem)))::SAFE(SAFE(SAFE($pathval)))
eval $pathvar=$elem:$pathvalwhere I have used green text background to indicate stff that should have no sntax when eval'ed, and red to indicate syntax.
So to be clear, you suggest that we have (for want of a better term) a bit to indicate that something should be treated as data? Was that the sort of thing the near legendary Intel 432 did?
I'm not saying it's a bad idea, I'm just trying to map it into historical perspective ;>Responding inline, because one of blogger's weaknesses is no formatting in comments. (Probably deliberate, to prevent complex conversations.)
abort: filename contains ':', which is reserved on Windows: ...