DynamoDS / DesignScript

About the DesignScript language
Apache License 2.0
11 stars 10 forks source link

Clean up builtins #6

Closed pboyer closed 7 years ago

pboyer commented 8 years ago

Mainly, this PR removes built-ins that would make more sense in the List package.

It also adds an Append method.

pboyer commented 8 years ago

Ping @ke-yu

ke-yu commented 8 years ago

We probably should exclude Concat() as it is not well defined. As a list in DS could be a dictionary, if concatenating two dictionaries have same keys, the operation fails or one of value is overwritten?

ke-yu commented 8 years ago

LGTM

pboyer commented 8 years ago

Good point.

It should be said that Append, Remove, and Insert suffer from the related issues. That is, they assume the underlying data structure is a list in their type annotations or don't clarify the semantics in the two cases.

Why not generalize these to the dictionary case, rather than expecting int arguments? This could be considered "javascript" style.

pboyer commented 8 years ago

I'll give this some more thought tomorrow. It's late now. :P

pboyer commented 7 years ago

PTAL @ke-yu