3 ms·
We can depict this solution in the following way: [table labeled :Users:] In my opinion that's a better way of encoding the desired behavior than either the
by brudgers 11y ago
We can depict this solution in the following way:
[table labeled :Users:]
In my opinion that's a better way of encoding the desired behavior than either the C# or F# code by several orders of magnitude. It can be read to find out what privileges a user state allows. It can be read to find out what user states is required to access a privilege.
The key is that tables are readable. By anyone. Even non-programmers. All the behavior is right there. The question about what's the best way to represent it in code is not F# versus C#. It's automatically versus wrong. The table should be the point of truth. [1]
[1]: The point of departure is Aaron Brooks' idea of live specification. I don't claim to accurately represent his view. Listen for yourself here: http://blog.cognitect.com/cognicast/074 http://blog.cognitect.com/cognicast/074