[pve-devel] [PATCH manager v2] fix #4758: ui: lxc wizard: allow multiple ssh keys

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Jul 17 13:54:30 CEST 2023

Am 17/07/2023 um 11:03 schrieb Dominik Csapak:
> On 7/13/23 12:09, Christoph Heiss wrote:
>> also: s/let/const/
> hmm... we don't really have a style recommendation which to prefer.
> maybe we should improve our style guideline to have some more hints when to use const
> and when to use let?
> (even if it's just 'use const whenever possible')

Meh, I don't think `const` gives us much in a dynamic language like JS, where
one then even has to ensure that one didn't write to a const marked value (which
was only marked as such for above reason), let vs. var on the other hand gives
us clear wins and avoids bugs, so using let as default, and const if it really is
a constant seems more sensible to me.

I adapted our JS style guide a bit, should be clearer (I don't want to "forbid"
const, but using let is preferred):


> is there a strong reason here to use const vs let?
> (is there in the general case, besides the immutable nature of the variable?)

IMO no, especially as the content a variable for an object or array points
to stays modifiable, so it might be even confusing.

More information about the pve-devel mailing list