-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chapel's list
type should support initialization from an iterator expression
#16166
Comments
After PR #16180 we could alternatively adjust |
Would that have the effect of manifesting the array in memory prior to assigning it to the list? (where I'm guessing it would be cheaper to just traverse the iterator and insert the elements one by one?) |
@bradcray - yes it would - as a result I would agree that the |
Actually, using the |
For issue chapel-lang#16166 --- Signed-off-by: Michael Ferguson <mppf@users.noreply.github.com>
Improve copy initializers for list * Make List's checkType return param since it just calls compilerError calls there is no need for it to exist at runtime. * Adjust list init= to be more flexible to handle issue #16706 * Add list init/init= from iterator expr for issue #16166 Reviewed by @dlongnecke-cray - thanks! - [x] full local testing
For issue chapel-lang#16166 --- Signed-off-by: Michael Ferguson <mppf@users.noreply.github.com> Signed-off-by: CaptainSharf <mohdsharf7407@gail.com>
It seems like it would be convenient / natural to have Chapel's
list
type support initialization from an initializer expression as follows:Is there a reason we wouldn't want to that I'm not seeing?
If not, this seems as though it could be implemented by defining an
init=
for list taking an_iteratorRecord
?The text was updated successfully, but these errors were encountered: