google / google/codeworld

Kill the reuse-by-shared-name pattern

Open
#1,365 0 comments 0 reactions 0 assignees View on GitHub
cleanup
Dominant language
Haskell
Stars
1.3k
Forks
201
PR merge metrics
No merged PRs in 30d

Description

There are several places where JavaScript code relies on the pattern of calling a function, and assuming that some other referenced JavaScript will define it. For example, `clearCode` and `updateUI` and `compile` are defined separately in codeworld.js and funblocks.js, and which one is called depends on which JavaScript code is loaded into the containing page.

That's an awful pattern. Code should be reorganized so that dependencies are passed in to the relevant functions, not picked up from the global namespace.

See #66

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.