Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #30596

Re: not "autovivification", but ...?

Path csiph.com!1.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!news.albasani.net!.POSTED!not-for-mail
From Stefan Weiss <krewecherl@gmail.com>
Newsgroups comp.lang.javascript
Subject Re: not "autovivification", but ...?
Date Wed, 1 Jun 2016 19:49:54 +0200
Organization albasani.net
Lines 26
Message-ID <nin783$9qu$1@news.albasani.net> (permalink)
References <autovivification-20160531121607@ram.dialup.fu-berlin.de> <nik0k5$8mu$1@news.albasani.net> <1dc7bd11-343d-4cbb-b75d-1db8516666a0@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Trace news.albasani.net lpoioGHlMmLldEgsoQIkVQVQ5B1o3MxBXI5y792h07Gpe0HX7YwoaBKl81IbeOqlFGFBVFyH41rhI+uDp7p+Uw==
NNTP-Posting-Date Wed, 1 Jun 2016 17:49:55 +0000 (UTC)
Injection-Info news.albasani.net; logging-data="730uq+FOTZYaswD6JUjpkSFwM3wtFP4VTYmVjNejiWpLRhhkgjmHtMO497lvLR3dK1WqUjl6Fdhr/cv8gmD6aQ6V0xcnS7BB0oVwYNj9xI28VDgdD2nvONLDz/71ntD6"; mail-complaints-to="abuse@albasani.net"
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0
In-Reply-To <1dc7bd11-343d-4cbb-b75d-1db8516666a0@googlegroups.com>
Cancel-Lock sha1:gJ05STHWqkkr3ajSryo7yECHmk4=
Xref csiph.com comp.lang.javascript:30596

Show key headers only | View raw


Michael Haufe (TNO) wrote:
> IME, multi-level implicit creation is a sign that something is wrong
> with your architecture. It makes me ask: "Why were these undefined in the first
> place?"
> 
> The dual issue for implicit creation is accessing a nested structure
> where one or more of the intermediate members may not exist. My same
> question above applies there as well: Why don't these already exist?
>
> [snip examples of workarounds]
>
> Where fundamentally people should take a step back and take a moment to
> think at a higher level about what they are trying to accomplish.

I sort of agree with this, to a point, but only if I created the data
structure myself (or my application did). In many situations we simply don't
have that level of control over data. Examples for this would be external
APIs, JSON config files, or any other external tree-like structure mapped to
nested objects.

Are you saying that all data exchange formats with optional components are
badly designed, or that at least all known container nodes should be
present? I don't think that's a realistic requirement.


- stefan

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: not "autovivification", but ...? Stefan Weiss <krewecherl@gmail.com> - 2016-05-31 14:38 +0200
  Re: not "autovivification", but ...? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-06-01 08:03 -0700
    Re: not "autovivification", but ...? Stefan Weiss <krewecherl@gmail.com> - 2016-06-01 19:49 +0200
      Re: not "autovivification", but ...? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-06-01 14:29 -0700
        Re: not "autovivification", but ...? Stefan Weiss <krewecherl@gmail.com> - 2016-06-02 01:29 +0200
          Re: not "autovivification", but ...? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-02 02:16 +0200
            Re: not "autovivification", but ...? Stefan Weiss <krewecherl@gmail.com> - 2016-06-02 13:20 +0200
          Re: not "autovivification", but ...? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-06-02 15:51 -0700

csiph-web