← Back to team overview

ooc-dev team mailing list archive

Fwd: New ORC - Keyword arguments

 

I would think '...' is for a Bag, not a HashBag

E.g.:

print(fmt: String, args...)

And then we can iterate with for(arg in args) ?

(For the unitiniated: Bag = ArrayList<Cell>, HashBag = HashMap<Cell>.
Cell<T> can contain anything.)


On Mon, May 10, 2010 at 1:20 PM, Bart van der Werf <bluelive@xxxxxxxxx>wrote:

> c# uses the 'params' keyword, personally i like '...' for this
> What is the type of arguments ? array of T ?
>
>
> On Mon, May 10, 2010 at 1:00 PM, Friedrich Weber <
> fred.reichbier@xxxxxxxxxxxxxx> wrote:
>
>> Sounds good!
>> What about "variable" keyword arguments, as in Python's **kwargs syntax?
>> For example:
>>
>>        print: func (hello: String, :keywords) {
>>                // `keywords` is now a HashBag containing all additional
>> arguments.
>>        }
>>
>>        print("hello world", something="huhu", bla=123,
>> gnurk=ArrayList<String>
>> new())
>>
>> Also, default values for arguments would be helpful.
>>
>> Cheers,
>>
>> Friedrich
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~ooc-dev
>> Post to     : ooc-dev@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~ooc-dev
>> More help   : https://help.launchpad.net/ListHelp
>>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~ooc-dev
> Post to     : ooc-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ooc-dev
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References