Adam Salvail
Adam Salvail
Actually, being able to construct it would be tremendously useful to implement `TryFrom` for other objects through references, without resorting to a full _serde_ serialization/deserialization process. Now my only way...
I'll be curious to see what is your solution. AFAIK, the biggest problem is that `try_from` consumes its input, which wouldn't leave you with much to report on what happened.
> I think that when `iterate=False` is used, it should be mandatory to provide all states as inputs. Personally, I think it would be far better if the brick took...
> The bricks already take care of checking whether they were given all the states just by having the signature in which their states are mandatory parameters. I meant that...
I'd say that's why `Hash` versions were invented: to give an unrelated mapping to integers that can be used for sorting? One could make an argument for `RoomName` or `Position`,...
In that case, I'd vote to make sure `Hash` is derived, but let the end user figure out their own implementation for `PartialOrd`/`Ord`.
I went through the structs that we define. The only one I can see where it would make sense to add `Ord` is with `screeps::constants::Density`.
What if we added an ordering function (that returns a `std::cmp::Ordering`) to quickly implement `PartialOrd` with a wrapper type and that is efficient (like using the `packedPos` for `Position`)? I'm...
Clearly you want this implemented more than I want it not implemented 😛 I'm good with the orderings you suggested, with one exception: for `Position` and `RoomName`, sort first by...
You go ahead then. And don't worry, I am mostly convinced by the implementations you suggested. It's better than object ids in python in any case! I suppose it's my...