Description
This is just me being a bit anal, and it's entirely my fault in the first place, but I think the internal naming conventions in the generated code could be nicer. In this example...
...there's all sorts going on — renderMainFragment
, text$1
, eachBlock_anchor
, eachBlock_iterations
, cat__index
and so on.
I propose that we use snake_case for all generated identifiers, use a convention of adding _1
, _2
and so on to identifiers that need to be deconflicted, and avoid __
double underscores. This would be more consistent, a bit easier (everything is lowercase, no worrying about capitalising things or whatever), and would make it easy to distinguish between generated code and helpers.
So the examples above would become render_main_fragment
, text_1
, eachblock_anchor
, eachblock_iterations
and cat_index
.
Relatedly, it would be a tiny bit neater if we knew in advance that a particular name was going to be reused, so we could have div_0
, div_1
instead of div
, div_1
.