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

Precompute concatenated strings where possible #221

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ExE-Boss
Copy link
Contributor

@ExE-Boss ExE-Boss commented May 3, 2020

Fixes #217

@ExE-Boss ExE-Boss force-pushed the refactor/precompute-concatenated-strings branch from 5fc3c6b to b8918b0 Compare May 3, 2020 08:14
@domenic domenic requested a review from TimothyGu May 5, 2020 18:15
Copy link
Member

@TimothyGu TimothyGu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hoping for something a bit more ambitious, where string concatenations are done by a library function that handles all of the " to template literal conversion and de-stringification. Perhaps it could even be a class that can be passed around through the various context parameters we have in types.js. Manually changing things, in some cases making things less readable in the webidl2js source, wasn't what I had in mind.

@@ -39,12 +39,10 @@ class Iterable {
throw new TypeError("Illegal invocation");
}
if (arguments.length < 1) {
throw new TypeError("Failed to execute 'forEach' on '${this.name}': 1 argument required, " +
"but only 0 present.");
throw new TypeError("Failed to execute 'forEach' on '${this.name}': 1 argument required, but only 0 present.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather keep this the way it is.

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

Successfully merging this pull request may close these issues.

Better abstract string concatenation
2 participants