GNOME Bugzilla – Bug 686392
Allow unowned ref string in foreach loops (possibly useful as general extension)
Last modified: 2018-05-22 14:31:09 UTC
Consider loop: for (uint i = 0; i < array.length; i++) { array[i] = 0; } One could turn it into (syntax assume similar extensions as one in bug #638199): foreach (ref var el in array) { var = 0; } Proposed solution: - For arrays it treats the iteration variable as pointer as if in ref argument - For iterators it would call set function if it exists for store - For "lists" syntax it would call set function if it exists for store - (see proposed solution for bug #645850) For functional iteration I can add virtual function to ListIterator
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/325.