D - delete on arrays and associative arrays
- Charles Sanders (9/9) Dec 10 2003 Using delete on an associative array will remove the element and resize ...
- Ilya Minkov (8/17) Dec 10 2003 I suggest array and other language primitives which can be expressed as ...
- J Anderson (10/38) Dec 11 2003 Parhaps something like:
Using delete on an associative array will remove the element and resize the array . Using delete on a dynamic ( or otherwise ) array will just leave a blank spot in the middle of the array, not resizing. Could we have a 'remove' property that will remove the element , and resize the array ? I think this would go along way to help make the language more consistent and useful. C
Dec 10 2003
I suggest array and other language primitives which can be expressed as structs get their place as structs in the standard library. Some syntax would translate to certain methods, but also all other methods and propeties should be acessible directly. A compiler switch or inifile setting should specify in which namespace to look for definitions. This would allow the Standard Library group to enhance basic types. -eye In article <br7v4r$1lki$1 digitaldaemon.com>, Charles Sanders says...Using delete on an associative array will remove the element and resize the array . Using delete on a dynamic ( or otherwise ) array will just leave a blank spot in the middle of the array, not resizing. Could we have a 'remove' property that will remove the element , and resize the array ? I think this would go along way to help make the language more consistent and useful. C
Dec 10 2003
Ilya Minkov wrote:I suggest array and other language primitives which can be expressed as structs get their place as structs in the standard library. Some syntax would translate to certain methods, but also all other methods and propeties should be acessible directly. A compiler switch or inifile setting should specify in which namespace to look for definitions. This would allow the Standard Library group to enhance basic types. -eye In article <br7v4r$1lki$1 digitaldaemon.com>, Charles Sanders says...Parhaps something like: extend int { void remove(...) ... } Allowing anyone to add methods to the standard primitive (it could be used for classes as well but then it might take the place of inheritance). PS - I suggested this before for operator overloading, for the _r side, before it was implemented.Using delete on an associative array will remove the element and resize the array . Using delete on a dynamic ( or otherwise ) array will just leave a blank spot in the middle of the array, not resizing. Could we have a 'remove' property that will remove the element , and resize the array ? I think this would go along way to help make the language more consistent and useful. C
Dec 11 2003