Proposal: alternate syntax for the character `/` in file systems
- Lenguaje dominante
- Dart
- Estrellas
- 1.1k
- Forks
- 113
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
The current syntax for conditional files and folders is functional, but generates a file system representation that is really hard to understand and maintain.
### Example:
If I want a brick to generate an `android.dart` file only if the boolean parameter `android` is true, I'm supposed to name a file `{{#android}}android.dart{{/android}}`.
This has the effect of generating a directory named `{{#android}}android.dart{{` that contains a file named `android}}`
View in the MacOS finder:

View in VSCode

This split in a directory and a file doesn't match at all how we think about a single file.
### Proposal
If another syntax for conditional files and folders was introduced, that doesn't include the character `/`, we could view them as regular files, which would match the mental model about them being a file.
Dummy suggestions:
- Could we use the double `##` symbol for closing tags? like `{{#android}}android.dart{{##android}}`
- Could we use another available symbol? like `{{#android}}android.dart{{^android}}`
### Migration path
If this new syntax was introduced, it could be distributed in a first step alongside the current syntax, but the current syntax would trigger a warning with a recommendation to migrate to the new syntax. Then after a few versions, the old syntax would go away.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.