Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Dynamic Require API - Invocation Arguments
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  18 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Kris Kowal  
View profile   Translate to Translated (View Original)
 More options Jan 26 2011, 7:55 pm
From: Kris Kowal <kris.ko...@cixar.com>
Date: Wed, 26 Jan 2011 16:55:55 -0800
Local: Wed, Jan 26 2011 7:55 pm
Subject: Dynamic Require API - Invocation Arguments

On Wed, Jan 26, 2011 at 2:06 PM, khs4473 <khs4...@gmail.com> wrote:
> - Whether the module identifiers should be specified in a variadic
> list or an array:

A.) LOAD("a", "b", "c", function(...) { ... });
B.) LOAD(["a", "b", "c"], function(...) { ... });

Current show of hands. Please copy and update this block in responses.

A.)
B.) Kris Kowal +1, Christoph Dorn +1

Christoph Dorn on B: "This seems cleaner and easier to scan and lends
itself better to dynamic generation."

Kris Kowal


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mikeal Rogers  
View profile  
 More options Jan 26 2011, 7:57 pm
From: Mikeal Rogers <mikeal.rog...@gmail.com>
Date: Wed, 26 Jan 2011 16:57:39 -0800
Local: Wed, Jan 26 2011 7:57 pm
Subject: Re: [CommonJS] Dynamic Require API - Invocation Arguments
A.)
B.) Kris Kowal +1, Christoph Dorn +1, Mikeal Rogers +1

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Burke  
View profile  
 More options Jan 26 2011, 8:26 pm
From: James Burke <jrbu...@gmail.com>
Date: Wed, 26 Jan 2011 15:26:12 -1000
Local: Wed, Jan 26 2011 8:26 pm
Subject: Re: [CommonJS] Dynamic Require API - Invocation Arguments

On Wed, Jan 26, 2011 at 2:55 PM, Kris Kowal <kris.ko...@cixar.com> wrote:
> On Wed, Jan 26, 2011 at 2:06 PM, khs4473 <khs4...@gmail.com> wrote:
>> - Whether the module identifiers should be specified in a variadic
>> list or an array:

> A.) LOAD("a", "b", "c", function(...) { ... });
> B.) LOAD(["a", "b", "c"], function(...) { ... });

B.) +1 James Burke

Not adding the names, because I already started typing one message
before another came in with someone else's response in another thread,
so probably best to just indicate your preference and tabulate later.

James


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kris Kowal  
View profile  
 More options Jan 26 2011, 8:36 pm
From: Kris Kowal <kris.ko...@cixar.com>
Date: Wed, 26 Jan 2011 17:36:42 -0800
Local: Wed, Jan 26 2011 8:36 pm
Subject: Re: [CommonJS] Dynamic Require API - Invocation Arguments
Merging hands.

A.)
B.) Kris Kowal, Christoph Dorn, Mikeal Rogers, James Burke


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
khs4473  
View profile  
 More options Jan 26 2011, 8:55 pm
From: khs4473 <khs4...@gmail.com>
Date: Wed, 26 Jan 2011 17:55:38 -0800 (PST)
Local: Wed, Jan 26 2011 8:55 pm
Subject: Re: Dynamic Require API - Invocation Arguments
A)

Reasoning:  variadic list benefits newbies at minimal cost to advanced
users.

On Jan 26, 8:36 pm, Kris Kowal <kris.ko...@cixar.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kris Kowal  
View profile  
 More options Jan 26 2011, 9:08 pm
From: Kris Kowal <kris.ko...@cixar.com>
Date: Wed, 26 Jan 2011 18:08:41 -0800
Local: Wed, Jan 26 2011 9:08 pm
Subject: Re: [CommonJS] Re: Dynamic Require API - Invocation Arguments

On Wed, Jan 26, 2011 at 5:55 PM, khs4473 <khs4...@gmail.com> wrote:
> A)
> Reasoning:  variadic list benefits newbies at minimal cost to advanced
> users.

A.) Kevin H Smith
B.) Kris Kowal, Christoph Dorn, Mikeal Rogers, James Burke

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tom Robinson  
View profile  
 More options Jan 27 2011, 4:18 am
From: Tom Robinson <tlrobin...@gmail.com>
Date: Thu, 27 Jan 2011 01:18:34 -0800
Local: Thurs, Jan 27 2011 4:18 am
Subject: Re: [CommonJS] Re: Dynamic Require API - Invocation Arguments
What about a third option: the first argument could be an array, or a string if you want to load a single module.

C) LOAD(<String,Array> ids, function(...) { ... });


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kris Kowal  
View profile  
 More options Jan 27 2011, 4:24 am
From: Kris Kowal <kris.ko...@cixar.com>
Date: Thu, 27 Jan 2011 01:24:09 -0800
Local: Thurs, Jan 27 2011 4:24 am
Subject: Re: [CommonJS] Re: Dynamic Require API - Invocation Arguments
+1 for single-module shorthand.

A.) LOAD("a", "b", "c", function(...) { ... });
B.) LOAD(["a", "b", "c"], function(...) { ... });
C.) LOAD("a", function (a) { ... });

Hands:

A.) Kevin H Smith
B.) Kris Kowal, Christoph Dorn, Mikeal Rogers, James Burke
B+C.) Tom Robinson, Kris Kowal


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Irakli Gozalishvili  
View profile  
 More options Jan 27 2011, 9:06 am
From: Irakli Gozalishvili <rfo...@gmail.com>
Date: Thu, 27 Jan 2011 15:06:12 +0100
Local: Thurs, Jan 27 2011 9:06 am
Subject: Re: [CommonJS] Re: Dynamic Require API - Invocation Arguments

+1 B+C

Regards
--
Irakli Gozalishvili
Web: http://www.jeditoolkit.com/
Address: 29 Rue Saint-Georges, 75009 Paris, France <http://goo.gl/maps/3CHu>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hannes Wallnoefer  
View profile  
 More options Jan 27 2011, 9:12 am
From: Hannes Wallnoefer <hann...@gmail.com>
Date: Thu, 27 Jan 2011 15:12:09 +0100
Local: Thurs, Jan 27 2011 9:12 am
Subject: Re: [CommonJS] Re: Dynamic Require API - Invocation Arguments
A.) LOAD("a", "b", "c", function(...) { ... });
B.) LOAD(["a", "b", "c"], function(...) { ... });
C.) LOAD("a", function (a) { ... });

Hands:

A.) Kevin H Smith
B.) Kris Kowal, Christoph Dorn, Mikeal Rogers, James Burke
B+C.) Tom Robinson, Kris Kowal, Irakli Gozalishvili, Hannes Wallnoefer

2011/1/27 Irakli Gozalishvili <rfo...@gmail.com>:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
johnjbarton  
View profile  
 More options Jan 27 2011, 11:09 am
From: johnjbarton <johnjbar...@johnjbarton.com>
Date: Thu, 27 Jan 2011 08:09:54 -0800 (PST)
Local: Thurs, Jan 27 2011 11:09 am
Subject: Re: Dynamic Require API - Invocation Arguments

On Jan 27, 6:12 am, Hannes Wallnoefer <hann...@gmail.com> wrote:

> A.) LOAD("a", "b", "c", function(...) { ... });
> B.) LOAD(["a", "b", "c"], function(...) { ... });
> C.) LOAD("a", function (a) { ... });

> Hands:

> A.) Kevin H Smith
> B.) Kris Kowal, Christoph Dorn, Mikeal Rogers, James Burke, John J. Barton

+1


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
khs4473  
View profile  
 More options Jan 27 2011, 11:20 am
From: khs4473 <khs4...@gmail.com>
Date: Thu, 27 Jan 2011 08:20:08 -0800 (PST)
Local: Thurs, Jan 27 2011 11:20 am
Subject: Re: Dynamic Require API - Invocation Arguments
I (khs) would accept B+C as an alternative to A.

On Jan 27, 11:09 am, johnjbarton <johnjbar...@johnjbarton.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kris Kowal  
View profile  
 More options Jan 27 2011, 12:11 pm
From: Kris Kowal <kris.ko...@cixar.com>
Date: Thu, 27 Jan 2011 09:11:19 -0800
Local: Thurs, Jan 27 2011 12:11 pm
Subject: Re: [CommonJS] Re: Dynamic Require API - Invocation Arguments
Update:

A.) LOAD("a", "b", "c", function(...) { ... });
B.) LOAD(["a", "b", "c"], function(...) { ... });
C.) LOAD("a", function (a) { ... });

Hands:

A.) Kevin H Smith
B.) Kris Kowal, Christoph Dorn, Mikeal Rogers, James Burke, John J Barton
B+C.) Tom Robinson, Kris Kowal, Irakli Gozalishvili, Hannes
Wallnoefer, Kevin H Smith


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christoph Dorn  
View profile  
 More options Jan 27 2011, 12:27 pm
From: Christoph Dorn <christoph...@christophdorn.com>
Date: Thu, 27 Jan 2011 09:27:39 -0800
Local: Thurs, Jan 27 2011 12:27 pm
Subject: Re: [CommonJS] Re: Dynamic Require API - Invocation Arguments
Going with B or B+C.

Update:

A.) LOAD("a", "b", "c", function(...) { ... });
B.) LOAD(["a", "b", "c"], function(...) { ... });
C.) LOAD("a", function (a) { ... });

Hands:

A.) Kevin H Smith
B.) Kris Kowal, Christoph Dorn, Mikeal Rogers, James Burke, John J Barton
B+C.) Tom Robinson, Kris Kowal, Irakli Gozalishvili, Hannes
Wallnoefer, Kevin H Smith, Christoph Dorn


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Burke  
View profile  
 More options Jan 27 2011, 1:32 pm
From: James Burke <jrbu...@gmail.com>
Date: Thu, 27 Jan 2011 08:32:59 -1000
Local: Thurs, Jan 27 2011 1:32 pm
Subject: Re: [CommonJS] Re: Dynamic Require API - Invocation Arguments

On Wed, Jan 26, 2011 at 11:18 PM, Tom Robinson <tlrobin...@gmail.com> wrote:
> What about a third option: the first argument could be an array, or a string if you want to load a single module.

> C) LOAD(<String,Array> ids, function(...) { ... });

I prefer that the API args look similar to any module declaration,
like the define/module.declare variants that allow specifying
dependencies as an array. I like the mental model of "dependencies are
always in an array", which allows for easier human reading of code,
and gives the complete module API (definition and dynamic require)
more consistency.

So I'm still in B).

James


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nathan Rajlich  
View profile  
 More options Jan 27 2011, 1:28 pm
From: Nathan Rajlich <nat...@tootallnate.net>
Date: Thu, 27 Jan 2011 10:28:44 -0800
Local: Thurs, Jan 27 2011 1:28 pm
Subject: Re: [CommonJS] Re: Dynamic Require API - Invocation Arguments

All 3 versions *could* be easily supported by just a couple lines of code...

    function(modulesArray, callback) {
      if (!Array.isArray(modulesArray)) {
        callback = arguments[arguments.length-1];
        modulesArray = slice.call(arguments, 0, arguments.length-1);
      }
      // The rest of the module initialization...
    }

No?

On Thu, Jan 27, 2011 at 9:27 AM, Christoph Dorn <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Florian Traverse  
View profile  
 More options Jan 27 2011, 1:54 pm
From: Florian Traverse <florian.trave...@gmail.com>
Date: Thu, 27 Jan 2011 19:54:00 +0100
Subject: Re: [CommonJS] Re: Dynamic Require API - Invocation Arguments

Again, my syntax should be a

C)
REQUIRED_DEP("a").REQUIRED_DEP("b").EVENTUAL_ALIAS("foo").REQUIRED_DEP("b") .LOAD(function(...){...})

2011/1/27 Nathan Rajlich <nat...@tootallnate.net>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
khs4473  
View profile  
 More options Jan 28 2011, 4:02 pm
From: khs4473 <khs4...@gmail.com>
Date: Fri, 28 Jan 2011 13:02:25 -0800 (PST)
Local: Fri, Jan 28 2011 4:02 pm
Subject: Re: Dynamic Require API - Invocation Arguments

> No?

That's right - in fact, that's what I've got FlyScript doing.

On Jan 27, 1:28 pm, Nathan Rajlich <nat...@tootallnate.net> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »