Open AnmAtAnm opened 8 years ago
We can write the message in a fun way, targeted towards young/new programmers, creating a learning opportunity
Please remember that Blockly is a general purpose graphical programming editor. Generating a code comment is not appropriate for Blockly. This is something that might be appropriate for some Blockly-based projects used in education, such as Scratch. Also be sure to internationalize.
Related: 7928fac3cebd4ba310d94727e7b32ead06cb16b0
Good point about internationalization.
As for being inappropriate for all uses, that is why we include configuration to disable it (even if it is on by default).
Is this reported issue still needs a fix?
Blockly currently uses one-based indexing for lists and strings. This can be surprising to developers accustom to zero-based indexing, or Blockly users who see their code (extra math not found in the blocks, constants being changed).
We should document these differences in the generated code, in a single comment at the top of the code. Any block that uses ONE_BASED_INDEXING should trigger it.
We can write the message in a fun way, targeted towards young/new programmers, creating a learning opportunity:
The same string should be in our documentation, adjacent to documentation on disabling ONE_BASED_INDEXING. Developers who search the English string text will then learn why we chose that default, and how to disable it, if it doesn't fit their need.