This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 8967 - Why is the optional argument in the middle? Isn't it more convenient when copy/pasting code to make optional modifications at either end without having to precisely place the cursor somewhere in the middle? Particularly for piecing together arguments, too
Summary: Why is the optional argument in the middle? Isn't it more convenient when cop...
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: LC
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-13 12:21 UTC by contributor
Modified: 2010-10-04 13:59 UTC (History)
5 users (show)

See Also:


Attachments

Description contributor 2010-02-13 12:21:37 UTC
Section: http://www.whatwg.org/specs/web-apps/current-work/#posting-messages

Comment:
Why is the optional argument in the middle? Isn't it more convenient when
copy/pasting code to make optional modifications at either end without having
to precisely place the cursor somewhere in the middle? Particularly for
piecing together arguments, too, since one could append the mandatory
arguments first, and then if somewhere else some ports are required simple +
them to the string. Admittedly, this would be crafting a string which then
would have to be executed. And what about having an array of arguments? The
second item is sometimes one argument, and sometimes another. So an array of
arrays couldn't handled simply (e.g. sometime [1], other times [2]) when
processing posts to multiple different domains and potential ports. Admittedly
that be a rather informative filling multiple forms from multiple domains, but
isn't that potentially desirable?

Posted from: 72.253.36.224
Comment 1 Ian 'Hixie' Hickson 2010-02-17 23:54:30 UTC
I don't understand what the text starting with "And what about having an array of arguments?" to the end is referring to.
Comment 2 Ian 'Hixie' Hickson 2010-02-23 11:33:46 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: It's in the middle because I was trying to keep targetOrigin at the end, since it looks weird to have targetOrigin in the middle, between the message being sent and the ports being sent.

(This is starting to get implemented. If you would really like this changed, it would be helpful if you could contact implementors who have this implemented, and ask them if they'd be willing to change it. In particular, I think WebKit has an implementation of this. Not sure if the others do yet.)
Comment 3 Simon Pieters 2010-02-23 12:42:16 UTC
Opera has implemented this, but we'd be happy to change so that the optional argument is at the end.

http://lists.w3.org/Archives/Public/public-html/2010Jan/0578.html