Closed lkraav closed 3 years ago
$v
was for keeping the key strokes down, but pretty sure this is configurable already with:
$plates->addConfig(['render_context_var_name' => 'view']);
It is configurable, and I did. But decisions (better defaults), not options, maybe? :)
I think this is a moot point now that I'm scraping v4, so we'll just be using $this for the templates, and the new component system will also use this or captured variables from a closure. In both scenarios, it's going to be more explicit and type friendly which I think addresses the main concern here.
Various reasons
Better DX, via https://miguelgfierro.com/blog/2018/python-pro-tips-understanding-explicit-is-better-than-implicit/ etc
Most PHPCS implementations, PHPMD, and possibly others, will highly likely flag single-letter variables (or anything less than 3 characters) as bad practice. They are probably correct.
...