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
warning and error equivalents of postf #5682
Comments
I like this :) I just think they should be called |
Personally, I have stopped using |
Hi I am interested in contributing to this issue! Would you please be able to guide me as to how I can get started and where I can locate the necessary files for making contributions to this? |
@Nini12345678901 Thank you for your interest. You can find information for contributors on our wiki, particularly pages under "Developer reference" section in the toolbar on the right. I hope you find these resources useful! |
Thank you for providing the link to the project's wiki! I have been reading through the different sections including Developer Reference. I am still unsure as to how I can navigate to the supporting files for this particular issue that I can use to set up on my IDE. I would appreciate the guidance, thank you. |
@Nini12345678901 I'm not sure I understand the scope of your question. If you ask about where in SC you can find the implementation of e.g. When you're in SC, you can find classes (with file locations) implementing a given method if you press ctrl-i/cmd-i with the cursor at the method name.
However, from the discussion above I'm not sure if we have a clear path forward. Are we in agreement that we want to introduce the new method(s)? And what should their names be? |
I am in favor of keeping what we have and just using |
@dyfer Thanks for the further information. If I'm understanding this properly, wouldn't I was unable to find the proper location of the C++ implementation as I would like to work on making any changes in regards to this issue in C++. If you have been able to find where they are, I'd appreciate it! |
When adding methods, we need to consider:
into
45 (old) vs 44 (new) characters... the case for a large functional benefit is relatively weak. On the other hand, if the methods are simply implemented as wrappers in sclang ( If the new methods are implemented in C++, I suspect that the maintenance and testing costs would be higher. Because the methods are so easily implemented as one-liners in sclang, I'd advise against complicating the effort. On balance, I think the benefit is not significant enough -- I'm with telephon here. |
@jamshark70 Thank you for your insight. I do see the points you have made as costs for implementing the new methods in C++ could potentially be higher. Is there a way I can still contribute to this issue that would increase efficiency or add beneficial value to the existing implementation? |
I'll leave that for others to decide. If it's up to me, I doubt that it's so important to do. If others really want it, then I won't object (low gain, but also low cost = not much reason for, also not much reason against). |
I would go further and remove As alternative, anyone who needs this (or wants) could implement their own shortcuts as class extensions:
(admittedly syntax wrong) my 2 cents :) |
I remember that in the beginning, I used to use @madskjeldgaard I don't really understand where your need comes from – is there any pressing problem? |
It's not a pressing problem at all. Just a convience method that I think would match postf. There are a lot of other things that are more important right now :) |
Motivation
The
.postf
is a neat shortcut for posting a formatted string.But personally I see my self doing things like
"% is not implemented yet".format("something").warn
and the equivalent with.error
all the time.Description of Proposed Feature
Add the following methods to String:
And, now that we are at it, a
String.postlnf
method equivalent to.postf
but with a newline like.postln
.The text was updated successfully, but these errors were encountered: