Damon Kwok
Damon Kwok
@SeanTAllen Updated.
@aturley Yes, i think you are correct.
Copying zulip conversation context: > 04:55 DamonKwok I think this may be complicated. My idea comes from Hashable, it only needs a fun hash (): USize. so, a lambda is...
@jemc If you have an extreme case that Usize cannot represent, that's not what SortBy is dealing with. SortBy focuses on conditional evaluations rather than solving all problems. See: >...
@SeanTAllen Many real world cases: ## Leveldb manager: - sort by key length - sort by memory used - sort by recent update ## A blog system, - sort by...
Focusing on existing types without compareable implementations. The comparison problem of complex types is reduced to a number comparison problem. This is what Sortby is going to do.
But that's not what I want to do. Maybe someone should add a new RFC for it.
I named it SortBy rather than any other name, hoping that it would be as simple and elegant as possible, and that no new types should be added for sorting....
@EpicEric I have a few questions: 1. How does the extra 10 lines of code solve the problems raised by @jemc ? 2. Your `SortBy` seems to do the same...
@EpicEric Can you create a temp git repository and submit a `sort*.pony` file and a `_test.pony` file that can be used by others? This can help others more clearly compare...