On 6/8/20 1:55 PM, Aaron Lauterer wrote:
>>
>> $vmids = [ grep { !$excludehash->{$_} } sort keys $vmlist->{ids}->%* ];
>>
>> but no hard feeling here.
> 
> I agree on the early sorting, but I am not sure about that oneliner. It's not 
> as easy to comprehend what's going on for someone who isn't used to this kind 
> of syntax already.

I mean, yes it uses some slightly more advanced things but due to the variable
names and keywords involved it should be somewhat clear that vmids are sorted
and filtered by the $excludehash.
So for people which lack that perl understanding required, the basic semantic
could be derived from context and for others it makes it quicker to read what's
actually being done as it's quite concise - at least for me.

Still, no hard feelings and I'm probably a bit biased here ;-)


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to