logo       

[jira] Commented: (BOO-500) self(index) instead of [DefaultMember(Item)] It: msg#00117

lang.boo.devel

Subject: [jira] Commented: (BOO-500) self(index) instead of [DefaultMember(Item)] Item(index)

[ http://jira.codehaus.org/browse/BOO-500?page=comments#action_47467 ]

Rodrigo B. de Oliveira commented on BOO-500:
--------------------------------------------

How about an attribute that does the System.Reflection.DefaultMember thing for
you?

class Alpha:
[default] Item(index):
get:
return DoSometing(index)

No special syntax and semantics needed.

> self(index) instead of [DefaultMember(Item)] Item(index)
> --------------------------------------------------------
>
> Key: BOO-500
> URL: http://jira.codehaus.org/browse/BOO-500
> Project: Boo
> Type: New Feature
> Components: Compiler
> Environment: All
> Reporter: Cameron Kenneth Knight
> Priority: Minor

>
>
> currently to access an object like an array, you have to do this:
> [DefaultMember("Item")]
> class Alpha:
> Item(index):
> return DoSomething(index)
> Alpha()['bravo']
> It would make a lot more sense to do
> class Alpha:
> self(index):
> return DoSomething(index)
> Alpha()['bravo']

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise