-
Notifications
You must be signed in to change notification settings - Fork 15
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
Name proposal for lazy operations: past tense #11
Comments
I'm not sure whether using past tense is explicit enough. Anyway, better discuss that in the base Julia repo? |
i like this |
Ok, further thoughts: why not just make everything lazy? Eager methods could just be optimization methods of Base.collect |
While I may somewhat agree with you... I try to follow Also, some operations aren't obviously better being lazy. |
I mean, map internally creates a generator and collects it, so... |
Unlike most operations where we can just rely on iteration and separation of concerns and still get optimal performance, for this particular case I think it would be necessary to overload the method explicitly. There's worse complications regarding anonymous functions that can't be introspected and the fact that Of course, for something like |
I think the solution in that case is pretty easy: |
I've been happy to seperate the semantics of greedy-vs-lazy operations into seperate functions, like
map
vsmapview
andgroup
vsgroupview
. However, theview
suffix is a little tiresome.I'm wondering if we should follow the example set by
Base.Broadcast
which usesbroadcast(...) = materialize(broadcasted(...))
, wherebroadcasted
is more-or-less a lazy version ofbroadcast
andmaterialize
is something that behaves a bit likecopy
when necessary.That would be something like:
mapview
->mapped
.groupview
->grouped
.joined
instead ofjoin
.filtered
for lazyfilter
.product
is a noun, not a verb, and seems fine being lazy.flatten
vsflattened
?splitdims
atBase
andslice
/slices
seems like a possible naming.sliced
could be a lazy version?Does anyone have any thoughts or opinions?
The text was updated successfully, but these errors were encountered: