Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd List.find #303
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
texastoland
Jul 21, 2015
This should proxy to Native right? I've been wondering whether there's criteria for Core inclusion.
texastoland
commented
Jul 21, 2015
|
This should proxy to Native right? I've been wondering whether there's criteria for Core inclusion. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rtfeldman
Jul 21, 2015
Member
Would proxying to Native improve this though? With the impending self-TCO this compiles to a while loop anyway, yeah?
|
Would proxying to Native improve this though? With the impending self-TCO this compiles to a |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
texastoland
Jul 21, 2015
Native JS uses C++ cheats. Based on O(1) optimizations V8 performs on property access it's reasonable to imagine find() using a reverse cache lookup on object ID. In general if there's a native function we should always proxy.
texastoland
commented
Jul 21, 2015
|
Native JS uses C++ cheats. Based on O(1) optimizations V8 performs on property access it's reasonable to imagine |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
texastoland
Jul 21, 2015
PS I agree it should be included I just wish we had a criteria for completeness and rejection.
texastoland
commented
Jul 21, 2015
|
PS I agree it should be included I just wish we had a criteria for completeness and rejection. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Jul 21, 2015
Member
For now the recommended way of extending the standard libraries is in a package, like elm-list-extra or elm-random-extra. There can be lots of experimentation with APIs there that does not block on me or the release cycle of elm-lang/core. At some point, we will go through and try to merge in all the best things about the *-extra world in a coherent way.
I suspect @rehno-lindeque would accept this function in elm-list-extra, try a PR there for now.
|
For now the recommended way of extending the standard libraries is in a package, like elm-list-extra or elm-random-extra. There can be lots of experimentation with APIs there that does not block on me or the release cycle of I suspect @rehno-lindeque would accept this function in elm-list-extra, try a PR there for now. |
evancz
closed this
Jul 21, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
texastoland
commented
Jul 21, 2015
|
Thanks for the clarification @evancz makes sense to me |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Fair enough! Moved the PR to |
rtfeldman commentedJul 21, 2015
This adds
List.find, a useful function I've been using in a personalUtil.elmfile, but which seems like a good candidate for inclusion incoregiven that it's standard in several languages, for example: