Please have a look at brick-tabular-list on hackage. #442
Replies: 6 comments 7 replies
-
@amano-kenji I'm not sure what you are looking for. Is this a request for feedback of some kind? |
Beta Was this translation helpful? Give feedback.
-
No, but in this case you could derive
I understand. I shared the feedback because of community conventions that are good to know about, and it's a change I'd want to make if I were the maintainer. I find that if confusion is especially likely in an API design like this, that can also mean that there are too many type variables and that a different abstraction might be better than thinking hard about better names for the (many) type variables. |
Beta Was this translation helpful? Give feedback.
-
For what it's worth, I sense some defensiveness here, and if that's true then I wanted to clarify that my feedback isn't intended as a criticism of the approach taken in your library. It's feedback on how I think about it, which is, after all, what you asked for. :) You can take it or leave it and perhaps consider it next time you are working on something. |
Beta Was this translation helpful? Give feedback.
-
To be honest, I thought it was going to be very difficult to eliminate type variables because I couldn't figure out a way to improve it while I was implementing it for the first time. But, because you mentioned it, I briefly re-examined brick-tabular-list. I quickly realized that I could replace
with just
The API could be simplified greatly. The type variable It seems that an hour of work in flow state full of energy can be more productive than 100 hours of tired grind. In general, if you are grinding and tired, it is not right. My aim is to do more work in flow state in order to speed things up instead of grinding more. You cannot beat flow state with grind. I considered newtype, but the API is simple enough that it seems very unlikely to make mistakes without newtype. If I get confused with types of function parameters, I may consider newtype. |
Beta Was this translation helpful? Give feedback.
-
What a great discovery!
I have also found this to be true. And taking a break from what you're working on and coming back to it later can easily provide a fresh perspective where you might notice things that you didn't before - bugs, but also better design ideas, etc. Our brains have a habit of continuing to "work" for us even when we are not actively focused on a thing, and it can be nice to put that to good use. |
Beta Was this translation helpful? Give feedback.
-
After experimenting with newtypes, I realized newtypes make implementation infinitely more redable. Thus, I replaced all type alises with newtypes. Now, people can actually read and understand implementation. With newtypes, demo programs are much more redable, too. Now, the API is simple and easy to understand. Before 1.0.0.0 and 2.0.0.0, the API and the implementation were a bit ugly and difficult to understand. brick-tabular-list-2.0.0.0 is excellent. It almost seems perfect. If it is perfect, it hopefully won't need breaking changes in the next few decades. A challenge with newtype was to devise good abbreviated names for newtype constructors and make newtypes that match library concepts. I think I can say brick-tabular-list is really finalized. I told you I would tackle tabular list problem until it is done. This is the power of strong intention. |
Beta Was this translation helpful? Give feedback.
-
I think its documentation and its implementation can be considered finalized.
Please come have a look at brick-tabular-list, and run the demos.
It can be improved, but it's already good enough to not need modification for how long do I know?
Beta Was this translation helpful? Give feedback.
All reactions