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

Rename platform JavaScript to Web #5205

Closed
Geequlim opened this issue Aug 19, 2022 · 6 comments · Fixed by godotengine/godot#65239
Closed

Rename platform JavaScript to Web #5205

Geequlim opened this issue Aug 19, 2022 · 6 comments · Fixed by godotengine/godot#65239
Labels
breaks compat Proposal will inevitably break compatibility platform:web topic:porting
Milestone

Comments

@Geequlim
Copy link

Describe the project you are working on

Describe the problem or limitation you are having in your project

I plan to develop JavaScript bindings for godot. JavaScript is a well-known programming language, but in godot it represents the name of a platform.

Namespaces are not supported in godot, so I can't provide another JavaScript class to represent real JavaScript. Even if I named it something else, existing JavaScript would be misleading.

What about rename it to Web?

Describe the feature / enhancement and how it helps to overcome the problem or limitation

As the name suggests, intuitive

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

This isn't anything difficult, but will break compatibility, so the name change before the 4.0 release is an opportunity.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Is there a reason why this should be core and not an add-on in the asset library?

@YuriSizov YuriSizov added topic:porting platform:web breaks compat Proposal will inevitably break compatibility labels Aug 19, 2022
@Calinou Calinou added this to the 4.0 milestone Aug 19, 2022
@dsnopek
Copy link

dsnopek commented Aug 19, 2022

At a high-level this makes sense: the web browser is the platform, not the Javascript language.

I plan to develop JavaScript bindings for godot.

FYI, there are already a couple of Javascript bindings for Godot:

@YuriSizov
Copy link
Contributor

@dsnopek Your second link deserves a second look 😛

@dsnopek
Copy link

dsnopek commented Aug 19, 2022

Heh, ah, yeah... That link should probably be promoted to the proposal description! And "I plan to develop" should perhaps be changed to "I have developed"? :-)

@Faless
Copy link

Faless commented Sep 2, 2022

From godotengine/godot#65094 (comment) :

The JavaScript singleton is mainly an interface for interacting with JavaScript code, like JavaClassWrapper in the android platform, so I'm not sure calling it Web* makes much sense.
Maybe JavaScriptWrapper or JavaScriptBridge?

@Geequlim
Copy link
Author

Geequlim commented Sep 2, 2022

Maybe JavaScriptWrapper or JavaScriptBridge ?

JavaScriptBridge looks more suitable.

The JavaScriptObject will be confusing if there is a JavaScript class representing the script resource of JavaScript binding. How about rename the JavaScriptObject to WebObject, WebNativeObject or any suggestion ?

@Faless
Copy link

Faless commented Sep 2, 2022

The JavaScriptObject will be confusing if there is a JavaScript class representing the script resource of JavaScript binding.

Well, tbh, a Script resource called JavaScript is confusing anyway, I would assume it's Java bindings in case, not JS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaks compat Proposal will inevitably break compatibility platform:web topic:porting
Projects
No open projects
Status: Approved
Development

Successfully merging a pull request may close this issue.

5 participants