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

Re: Counting characters in command output?





On 2024-02-15 06:30, Lawrence Velázquez wrote:
I would push it further: The worst-case perception would be one of ignorant arrogance.  Compatibility is not tradition, but calling it so suggests a dismissive, uncharitable belief that there are no plausible reasons for it -- only a stubborn preference for How Things Used to Be.  People rarely respond well when they think they're being called sclerotic morons.
On the contrary, compatibility is deference to tradition almost by definition.  However it does not follow that tradition is to be deprecated or dismissed -- long standing traditions often stand long because they deserve to, and compatibility is a value in itself -- one breaks compatibility only if some practical advantage clearly merits the added confusion of incompatibility.  In this case Mark had an issue, Roman agreed that the default was not optimal, and I'm agreeing with them.  Your hostility seems overwrought.  Voting is a poor mechanism for building consensus, in any case.
https://producingoss.com/en/consensus-democracy.html#when-to-vote
Interesting!

	% foo=(a b c)
	% printf '<%s>' $foo; echo
	<a><b><c>
	% bar=$foo
	% printf '<%s>' $bar; echo
	<a b c>

Ok, but:

% foo=(a b c);printf '<%s>' $foo; echo; bar=($foo); printf '<%s>' $bar; echo
                                            ^    ^     

<a><b><c>
<a><b><c>

... it is established that the assignment must be forced to array and will default to scalar, no?  Sure, it's not exactly algebra but it is bedrock zsh grammar.  And wasn't it Mark's original point that command substitution should likewise default to scalar?  

Anyway these probings of mine bother you so perhaps I should say nothing.




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