Skip to content
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

[Suggestion] Script Warning for converting strings into other types #2961

Open
MajorCooke opened this issue Feb 24, 2025 · 2 comments
Open

Comments

@MajorCooke
Copy link
Contributor

@RicardoLuis0 had the thought of adding a warning when it comes to converting strings into specific types, i.e. colors. As we were helping someone figure out why their code was running slowly, it became apparent that was the cause of their performance issues.

Perhaps it would be wise to add a warning to some types of conversions (or all of them if it hits the same)?

@Doom2fan
Copy link
Contributor

Doom2fan commented Feb 25, 2025

That'd lead to annoying warnings when people do it intentionally in contexts where it won't cause performance issues.
More annoying warnings make real warnings end up being ignored.

@RicardoLuis0
Copy link
Collaborator

RicardoLuis0 commented Feb 26, 2025

it'd just be for color really, that's the one super expensive conversion, and only for implicit conversions, so with String s = ...;
Color c = s; would give a warning but Color c = Color(s); wouldn't

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants