New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Simplify the library #68
Conversation
I think changing functions to macros is not a good idea in C++, because the macros are not part of the See, e.g. these guidelines for more background and motivation: |
I think that, if macros are bad due to changing the code to an alias, doing the same with a inline function is basically the same but requires to create objects (like the Term object which is just needed to call is_stdin_a_tty, which is just an inline function). I think that a macro does the same thing but without an object. Or we just create the inline function as anomymous function in the term namespace - would be the same but you don't need to create an object you use only one time. What do you think about that? |
I think we should use either functions in the |
Yeah, i think you are right! I will move the functions to the Term namespace. I would generally minimize the functions of a class. What do you think? Rather all into the namespace or static functions? I will revert the other definitions as well, sorry of that! I'm rather new to C++. |
No worries. Let's discuss on a case by case basis where a function should belong. It seems more separate functions in the |
@MCWertGaming do you want to do a video call so that we can talk about the most useful way you can contribute? I have ideas how to improve the library and to add more examples to give people a better idea what it can do. |
Sure, which plattform do you prefer? But I can only in the evening on workdays (CEST). |
I sent you a private email to arrange it. |
All changes are split into seperate pull-requests. |
Hello, I'll try to simplify the code of this library in this pull-request. The main changes are turning most inline function into macros, move ansi codes into macros (so everyone can understand what the code actually does, because ansi is not human readable). changing some code logic to be smaller and cleaner. This will take me a bit, so I will post an update if the pull-request is ready to merge! But feel free to add notes, if you notice something i should change.
Best regards,
Damon