Re: Multi-assign

new topic     » goto parent     » topic index » view thread      » older message » newer message
DerekParnell said...

I'd prefer not to use '$' as it is already loaded with two meanings and to add a third is probably asking for future problems.

I think the dash '-' is fine for the LHS but not so good on the RHS. It could be a typo on the RHS where someone meant to key negative number as an parameter.

A new keyword is a really bad idea.

The preference for a shift-less character is not so important as the feature would not be a commonly used one. Also, keyboards vary as to which characters are shifted. For example, the tilde '~' is very awkward on some keyboards.

I think we need to have a glyph of some sort, and a visually prominent one would be preferable. We should try to avoid characters that are potentially typos.

So I think we are left with the single characters ... "@%^&*?" , and maybe combinations like "[]".

{ A, @, B }  = SomeFunc(1, @, 2) 
{ A, %, B }  = SomeFunc(1, %, 2) 
{ A, ^, B }  = SomeFunc(1, ^, 2) 
{ A, &, B }  = SomeFunc(1, &, 2) 
{ A, *, B }  = SomeFunc(1, *, 2) 
{ A, ?, B }  = SomeFunc(1, ?, 2) 
{ A, [], B } = SomeFunc(1, [], 2) 

The symbol may represent something that absorbs everything. In physics, this reminds me a black hole. A black hole could be formed by a collapsed star which in turn becomes a little star. 'Little star' is the meaning of the word 'asterisk' (http://en.wiktionary.org/wiki/asterisk).

The symbol of asterisk (asterisk character) is already known and used as "don't care" as in specifying file names (or paths) in CP/M, DOS, Microsoft Windows and Unix-like operating systems. In digital logic, a similar form symbol is used as "don't care": x.

- Fernando

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu