public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dietmar Maurer <dietmar@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Wolfgang Bumiller <w.bumiller@proxmox.com>
Cc: pmg-devel@lists.proxmox.com
Subject: Re: [pmg-devel] applied: [PATCH] panel/acme-domains: fix cyclic dependency in view model
Date: Tue, 23 Mar 2021 19:22:27 +0100 (CET)	[thread overview]
Message-ID: <79994563.854.1616523747514@webmail.proxmox.com> (raw)

> So, if on evaluation a get(X) is missed due to it being not always called,
> like with boolean statements where a single truthy is enough for an or expression
> like above, that data dependency is lost and one may see bug like behaviour.
> 
> Use intermediate variables to combat that, for example, above `accountValueHidden`
> formula should read:
> 
> accountValueHidden: (get) => {
>     let editable = get('accountEditable'), available = get('accountsAvailable');
>     return !editable || !available;
> },

I guess a good JIT can still optimize that away?




             reply	other threads:[~2021-03-23 18:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23 18:22 Dietmar Maurer [this message]
2021-03-24  7:21 ` Thomas Lamprecht
2021-03-24  7:31   ` Dominik Csapak
2021-03-24  7:34     ` Thomas Lamprecht
  -- strict thread matches above, loose matches on Subject: below --
2021-03-23 16:29 Thomas Lamprecht
2021-03-23 17:27 ` Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=79994563.854.1616523747514@webmail.proxmox.com \
    --to=dietmar@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    --cc=t.lamprecht@proxmox.com \
    --cc=w.bumiller@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal