Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 0.9
-
Fix Version/s: 0.9.5
-
Component/s: Compiler, Runtime (Boo.Lang)
-
Labels:None
-
Number of attachments :
Description
Adding the substraction operator on boo arrays would be a nice handy feature :
>>>cities = ['Tokyo', 'Barcelona', 'Moscow', 'Kuala Lumpur', 'Sidney']
>>>visited = cities - ['Moscow', 'Sidney']
Would give:
['Tokyo', 'Barcelona', 'Kuala Lumpur']
Also there is surely a bug with array's '+ operator' :
>>> cities = ['Tokyo', 'Barcelona', 'Moscow', 'Kuala Lumpur']
>>>cities += 'London'
Gives:
['Tokyo', 'Barcelona', 'Moscow', 'Kuala Lumpur', L, o, n, d, o, n]
Hardly the expected and preferable behavior I think?
Oddly enough that's the right behavior. You can Add anything IEnumerable to a List in which case all the elements are added. string enumerates over its characters.