Skip to content

Conversation

ChihweiLHBird
Copy link

@ChihweiLHBird ChihweiLHBird commented Jul 16, 2025

Related Issue

Fixes #1067

Description

Implement Length() functions for collection values, so users can avoid len(list.Elements()) which is less clean and efficient because Elements() allocate a new block of memory for returning a new slice.

If you guys prefer Size() or another naming, let me know and I can change it.

@ChihweiLHBird ChihweiLHBird requested a review from a team as a code owner July 16, 2025 07:54
@ChihweiLHBird ChihweiLHBird changed the title Add Length() function to all collection types Add Length() function to collection types Jul 16, 2025
@ChihweiLHBird ChihweiLHBird changed the title Add Length() function to collection types Add Length() function to collection values Jul 16, 2025
@ChihweiLHBird
Copy link
Author

Hi @rainkwan @austinvalle @stephybun, may I get some feedbacks and reviews for this change? Thanks!

@zliang-akamai
Copy link
Contributor

Any chance this may get a review?

@zliang-akamai
Copy link
Contributor

Hey @austinvalle @rainkwan @bbasata, may I get some thoughts from your team about this proposal? Thank you!

@bbasata
Copy link
Contributor

bbasata commented Sep 9, 2025

may I get some thoughts from your team about this proposal? Thank you!

Hi @ChihweiLHBird,

Thank you for your patience. The team recently selected this pull request for triage, and a teammate will follow-up here with any feedback to get this change merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Length() Function for Collection Types
3 participants