<div dir="ltr"><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important">Another -1 for this. </p>
<blockquote style="margin:1.2em 0px;border-left:4px solid rgb(221,221,221);padding:0px 1em;color:rgb(119,119,119);quotes:none">
<p style="margin:0px 0px 1.2em!important"> It adds complexity to object initializer processing, both in the obvious way (has to figure out to create the hidden object or possibly several nested hidden objects), and around the fact that object initializers are processed in source code order.</p>
</blockquote>
<p style="margin:0px 0px 1.2em!important">Exactly, this proposal assumes nested objects and that the nested key is referencing that object. But to assume this is problematic. What if the user wants the nested value to be something other than a plain object? with this approach, they’re stuck with just creating native objects.</p>
<p style="margin:0px 0px 1.2em!important">Not that it isn’t a good idea, but I think the negative effects of this change outweigh the benefit.</p>
<div title="MDH:QW5vdGhlciAtMSBmb3IgdGhpcy7CoDxkaXY+PGRpdj48YnI+PC9kaXY+PGRpdj4mZ3Q7Jm5ic3A7
PHNwYW4gc3R5bGU9ImNvbG9yOiByZ2IoMzMsIDMzLCAzMyk7Ij4mbmJzcDtJdCBhZGRzIGNvbXBs
ZXhpdHkgdG8gb2JqZWN0IGluaXRpYWxpemVyIHByb2Nlc3NpbmcsIGJvdGggaW4gPGcgY2xhc3M9
ImdyXyBncl8xNDM3IGdyLWFsZXJ0IGdyX2dyYW1tIGdyX2lubGluZV9jYXJkcyBncl9ydW5fYW5p
bSBHcmFtbWFyIG11bHRpUmVwbGFjZSIgaWQ9IjE0MzciIGRhdGEtZ3ItaWQ9IjE0MzciPnRoZSBv
YnZpb3VzIHdheTwvZz4gKGhhcyB0byBmaWd1cmUgb3V0IHRvIGNyZWF0ZSB0aGUgaGlkZGVuIG9i
amVjdCBvciBwb3NzaWJseSBzZXZlcmFsIG5lc3RlZCBoaWRkZW4gb2JqZWN0cyksIGFuZCBhcm91
bmQgdGhlIGZhY3QgdGhhdCBvYmplY3QgaW5pdGlhbGl6ZXJzIGFyZSBwcm9jZXNzZWQgaW4gc291
cmNlIGNvZGUgb3JkZXIuPC9zcGFuPjxicj48ZGl2Pjxicj48L2Rpdj48ZGl2PkV4YWN0bHksIHRo
aXMgcHJvcG9zYWwgYXNzdW1lcyBuZXN0ZWQgb2JqZWN0cyBhbmQgdGhhdCB0aGUgbmVzdGVkIGtl
eSBpcyByZWZlcmVuY2luZyB0aGF0IG9iamVjdC4gQnV0IHRvIGFzc3VtZSB0aGlzIGlzIHByb2Js
ZW1hdGljLiBXaGF0IGlmIHRoZSB1c2VyIHdhbnRzIHRoZSBuZXN0ZWQgdmFsdWUgdG8gYmUgc29t
ZXRoaW5nIG90aGVyIHRoYW4gYSBwbGFpbiBvYmplY3Q/IHdpdGggdGhpcyBhcHByb2FjaCwgdGhl
eSdyZSBzdHVjayB3aXRoIGp1c3QgY3JlYXRpbmcgbmF0aXZlIG9iamVjdHMuPC9kaXY+PGRpdj48
YnI+PC9kaXY+PGRpdj5Ob3QgdGhhdCBpdCBpc24ndCBhIGdvb2QgaWRlYSwgYnV0IEkgdGhpbmsg
dGhlIG5lZ2F0aXZlIGVmZmVjdHMgb2YgdGhpcyBjaGFuZ2Ugb3V0d2VpZ2ggdGhlIGJlbmVmaXQu
PGRpdj48YnI+PC9kaXY+PGRpdj48L2Rpdj48L2Rpdj48L2Rpdj48L2Rpdj4=" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0">​</div></div><div><div><div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jun 23, 2017 at 1:27 AM Michael Kriegel <<a href="mailto:michael.kriegel@actifsource.com">michael.kriegel@actifsource.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>I also vote against this. A further problem could be duplication
      of field names in large objects. Imagine there is a
      field2.field3.field4.field5 in the beginning of your object and
      then another one 100 lines below. Using the currently well defined
      way to define nested objects at least groups fields which belong
      to an object.<br>
    </p></div><div text="#000000" bgcolor="#FFFFFF">
    <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px">var obj = {</div>
    <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px">    field1: "val" ,</div>
    </div><div text="#000000" bgcolor="#FFFFFF"><div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px">    field2.field3: 3,<br>
          //hundrets of lines<br>
    </div>
    <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px">    field2.field3: true<br>
    </div>
    <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px">};<br>
      <br>
      Also it is much shorter, not to repeat the field names each time:</div></div><div text="#000000" bgcolor="#FFFFFF"><div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px"><br>
      <br>
      <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px">var obj = {</div>
      <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px">    field1: "val" ,</div>
      <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px">    field2:{<br>
              field3: 3,</div>
      <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px">      field4: true<br>
            }<br>
      </div>
      </div></div><div text="#000000" bgcolor="#FFFFFF"><div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px"><div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px">};<br>
        <br>
        Michael<br>
      </div>
    </div></div><div text="#000000" bgcolor="#FFFFFF">
    <br>
    <div class="m_1917672542939694581moz-cite-prefix">On 23.06.2017 04:13, Sebastian Malton
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <p>I don't see how this is like referencing the object a field is
        in during object construction. Yes field2.field4 would not be
        able to reference field2.field3 but that is not what I am
        proposing. I am proposing a syntactic sugar for nested objects<br>
      </p>
      <br>
      <div class="m_1917672542939694581moz-cite-prefix">On 2017-06-22 10:05 PM, J Decker
        wrote:<br>
      </div>
      <blockquote type="cite">
        <div dir="ltr"><br>
          <div class="gmail_extra"><br>
            <div class="gmail_quote">On Thu, Jun 22, 2017 at 7:56 AM,
              Sebastian Malton <span dir="ltr"><<a href="mailto:sebastian@malton.name" target="_blank">sebastian@malton.name</a>></span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div>
                  <div id="m_1917672542939694581m_2725831119315282546response_container_BBPPID" dir="auto">
                    <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="width:100%">
                      <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px">I
                        would like to propose that the dot or '.' is
                        allowed in object field names so that the
                        following are allowed. </div>
                      <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px"><br>
                      </div>
                      <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px">var
                        obj = {</div>
                      <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px">   
                        field1: "val" ,</div>
                      <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px">   
                        field2.field3: 3,</div>
                      <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px">   
                        field2.field4: true</div>
                      <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px">};</div>
                      <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px"><br>
                      </div>
                    </div>
                  </div>
                </div>
              </blockquote>
              <div><br>
              </div>
              <div>This is much like</div>
              <div>var obj = { </div>
              <div>   field1: 3</div>
              <div>   field2 : 4</div>
              <div>   field3 : obj.field2+3</div>
              <div>}</div>
              <div><br>
              </div>
              <div>which falls apart because obj isn't technically fully
                defined, and doesn't have a field2.  So your second
                field2.field4 wouldn't be able to reference the previous
                object created for field2.field3.</div>
              <div><br>
              </div>
              <div>it would be a huge complexity for engines to create
                objects....</div>
              <div> </div>
              <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div>
                  <div id="m_1917672542939694581m_2725831119315282546response_container_BBPPID" dir="auto">
                    <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="width:100%">
                      <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px"><br>
                      </div>
                      <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px"><br>
                      </div>
                      <div id="m_1917672542939694581m_2725831119315282546BB10_response_div_BBPPID" dir="auto" style="font-family:sans-serif;width:379px">Sebastian </div>
                    </div>
                    <div id="m_1917672542939694581m_2725831119315282546response_div_spacer_BBPPID" dir="auto" style="width:100%"> <br>
                    </div>
                    <div id="m_1917672542939694581m_2725831119315282546blackberry_signature_BBPPID" dir="auto"> </div>
                  </div>
                </div>
                <br>
                _______________________________________________<br>
                es-discuss mailing list<br>
                <a href="mailto:es-discuss@mozilla.org" target="_blank">es-discuss@mozilla.org</a><br>
                <a href="https://mail.mozilla.org/listinfo/es-discuss" rel="noreferrer" target="_blank">https://mail.mozilla.org/listinfo/es-discuss</a><br>
                <br>
              </blockquote>
            </div>
            <br>
          </div>
        </div>
        <br>
        <fieldset class="m_1917672542939694581mimeAttachmentHeader"></fieldset>
        <br>
        <pre>_______________________________________________
es-discuss mailing list
<a class="m_1917672542939694581moz-txt-link-abbreviated" href="mailto:es-discuss@mozilla.org" target="_blank">es-discuss@mozilla.org</a>
<a class="m_1917672542939694581moz-txt-link-freetext" href="https://mail.mozilla.org/listinfo/es-discuss" target="_blank">https://mail.mozilla.org/listinfo/es-discuss</a>
</pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="m_1917672542939694581mimeAttachmentHeader"></fieldset>
      <br>
      <pre>_______________________________________________
es-discuss mailing list
<a class="m_1917672542939694581moz-txt-link-abbreviated" href="mailto:es-discuss@mozilla.org" target="_blank">es-discuss@mozilla.org</a>
<a class="m_1917672542939694581moz-txt-link-freetext" href="https://mail.mozilla.org/listinfo/es-discuss" target="_blank">https://mail.mozilla.org/listinfo/es-discuss</a>
</pre>
    </blockquote>
    <br>
    </div><div text="#000000" bgcolor="#FFFFFF"><pre class="m_1917672542939694581moz-signature" cols="72">-- 
Michael Kriegel • Head of R&D • Actifsource AG • Haldenstrasse 1 • CH-6340 Baar • <a class="m_1917672542939694581moz-txt-link-abbreviated" href="http://www.actifsource.com" target="_blank">www.actifsource.com</a> • <a href="tel:+41%2056%20250%2040%2002" value="+41562504002" target="_blank">+41 56 250 40 02</a></pre>
  </div>

_______________________________________________<br>
es-discuss mailing list<br>
<a href="mailto:es-discuss@mozilla.org" target="_blank">es-discuss@mozilla.org</a><br>
<a href="https://mail.mozilla.org/listinfo/es-discuss" rel="noreferrer" target="_blank">https://mail.mozilla.org/listinfo/es-discuss</a><br>
</blockquote></div>