Kill the reuse-by-shared-name pattern
- Lenguaje dominante
- Haskell
- Estrellas
- 1.3k
- Forks
- 201
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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
Guía de contribución
Línea de trabajo
Start by reading the shared-name uses of clearCode, updateUI, and compile in codeworld.js and funblocks.js, then review the related discussion in #66. Reorganize the functions so dependencies are passed explicitly rather than resolved through the global namespace; done means these functions no longer rely on same-named definitions from whichever JavaScript the page loads.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- frontend
- Tipo de issue
- Refactorización
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100