logo       

[jira] Commented: (BOO-224) allow for partial classes: msg#00034

lang.boo.devel

Subject: [jira] Commented: (BOO-224) allow for partial classes

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

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

I do think partial classes are a very useful feature and it will certainly be
part of boo some time soon.

I'm still not sure if requiring the 'partial' keyword in the type declaration
is the way for boo to go.

I would like us to be able to do things like the following eventually:

namespace System

class String:
def MyCoolStringMethod():
return self.Trim().ToUpper()

Open classes.

I'm sure I'll be in a better position to suggest something more concrete after
the PDC.

> allow for partial classes
> -------------------------
>
> Key: BOO-224
> URL: http://jira.codehaus.org/browse/BOO-224
> Project: Boo
> Type: New Feature
> Components: Compiler
> Reporter: Scott Fleckenstein
> Assignee: Rodrigo B. de Oliveira
> Attachments: partial2.patch
>
>
> add the "partial" modifier to type definitions such that you can spread the
> defintion of a class accross multiple physical files. example:
> in SomeClass-1.boo
> partial class SomeClass:
> field1 as string
> field2 as string
>
> def someOp():
> someOpInSecondFile()
>
> def someOpInFirstFile():
> pass
>
> in SomeClass-2.boo
> partial class SomeClass:
> def someOpInSecondFile():
> someOpInFirstFile()

--
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