[ 
https://issues.apache.org/jira/browse/GROOVY-5064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Milles updated GROOVY-5064:
--------------------------------
    Fix Version/s:     (was: 4.x)

> array as a native generic
> -------------------------
>
>                 Key: GROOVY-5064
>                 URL: https://issues.apache.org/jira/browse/GROOVY-5064
>             Project: Groovy
>          Issue Type: Wish
>          Components: syntax
>    Affects Versions: 1.9-beta-3
>         Environment: Allow use normal sintax arrays with resources like 
> generic and include simple operations sintax to handle itens
>            Reporter: Jonathan de Sena Ribeiro
>            Priority: Major
>              Labels: wish
>   Original Estimate: 504h
>  Remaining Estimate: 504h
>
> Native generic in array reestruturation
> - normal array = typed collection with static size
> string[] arr = new string[10];
> - array as generic, typed collection with dynamic size
> string[] arr= new string[*];
> - operation with arrays
> arr += "nome"; // = list.add("nome");
> arr1 += arr2;  // [1,2] + [3,4] = [1,2,3,4]; 
> arr -= "nome2"; // = list.removeInSearchContent("nome2");
> arr = arr * "nome"; // set all itens = "nome";
> arr = arr / "nome"; // remove all items = "nome";
> arr[1] = null; // way to remove item without resize;
> arr[1].dispose(); // remove item and resize;
> - comparisson with arrays
> arr1 > arr2 or arr1< arr2; // compare length
> arr1== arr2; // compare equality with each ite, content
> - to simulate dynamic type like generic:
> def[] arr = new def[*]
> obs.: the index first must 1 based like in SQL(is more intuitive)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to