| 10 Nov 2025 |
| @adis:blad.is left the room. | 04:58:06 |
piegames | The would probably not mesh well with future performance optimisations | 08:07:14 |
piegames | mixing code with data was a mistake | 08:17:16 |
K900 | Honestly IMO the only way to do function equality at this point is to hard ban it | 08:17:52 |
K900 | Because any attempt to fix the semantics will lead to code that evaluates subtly differently wrong on new and old semantics | 08:18:25 |
piegames | Yes but once you ban it you want to move off all functions off your data structures to retain the ability to compare your data | 08:18:42 |
K900 | Yes | 08:18:57 |
K900 | Unironically yes | 08:18:58 |
Qyriad | In reply to @piegames:flausch.social Yes but once you ban it you want to move off all functions off your data structures to retain the ability to compare your data well, unless you simply don't count functions in structure comparisons | 08:19:09 |
piegames | Glad we agree. I still need a vision how to do that for a language within the Nix ecosystem tbh | 08:19:45 |
K900 | There's literally one place in nixpkgs where this is relevant | 08:19:47 |
K900 | And it can be fixed with a treewide | 08:19:57 |
K900 | Annoying as that may be | 08:20:02 |
piegames | That would be possible but honestly feel weird | 08:20:12 |
piegames | Which one? | 08:20:17 |
K900 | Platform equality | 08:20:28 |
Qyriad | In reply to @piegames:flausch.social That would be possible but honestly feel weird it would make comparison trinary, ¯\_(ツ)_/¯ | 08:20:52 |
piegames | How so? | 08:21:29 |
K900 | Expr::eq(this, that) -> MsoTristate | 08:21:36 |
K900 | When | 08:21:36 |
Qyriad | you're probably right that it's better to not, though | 08:22:03 |
K900 | (in case anyone isn't familiar, https://learn.microsoft.com/en-us/dotnet/api/microsoft.office.core.msotristate?view=office-pia) | 08:22:29 |
piegames | What I dislike is that you have some data structure, it compares nicely, now you want to add a helper function that manipulates the data, suddenly your data has no equality anymore | 08:24:22 |
Qyriad | yeah that's whatI don't like either | 08:57:14 |
Qyriad | * yeah that's what I don't like either | 08:57:34 |
Rutile (Commentator2.0) feel free to ping | == vs ===? /hj | 09:11:18 |
Qyriad | ban == for sets entirely and require defining a __eq? /hj | 09:11:58 |
piegames | So my take is that for most data structures ("types"), the code doesn't change between most instances. So it could be factored out of the comparison. Only attrs that actually need per-value functions to be different would be incomparable | 09:16:14 |
piegames | Yknow, just the normal stuff from most every other language | 09:16:25 |
K900 | I mean having a user defined __eq would be good for other reasons as well | 09:17:59 |