Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: why not promote the plague ? (brace|rc|alternative|modern) syntax






On 2024-12-16 11:23, Lawrence Velázquez wrote:
That leads to this fun comparison:

	% setopt SHORT_LOOPS
	% f() print abc && print xyz; f
	xyz
	abc
	% function g; print abc && print xyz; g
	abc
	xyz

This could bite someone who's absentmindedly refactoring code.
Strictly as an armchair quarterback (where it's all so easy), it seems to me that zsh 6.0 should make a break with this chaos, decide on what's best practice and cut out everything else.  One might entertain the idea that there could be more than one grammar for loops or whatever else, but not 15, that's just anarchy.  Freedom that does not add function is not freedom it's just confusion. Strictness isn't a burden, it's a comfort. It shouldn't take 20 pages in the manual to elucidate the while loop, it should take one paragraph.  I get the feeling that most of the variations that have been discussed were never actually planned, they just sorta happened as parsing artifacts.  They are emergent.  Gotta happen after 30 years of accretion, but the time comes to shake it all out.  Just my 2 cents, as usual.








Messages sorted by: Reverse Date, Date, Thread, Author