28 Jan 22:07
Re: method names
From: Luis M. Gonzalez <luismg@...>
Subject: Re: method names
Newsgroups: gmane.comp.lang.boo.user
Date: 2005-01-28 21:07:39 GMT
Subject: Re: method names
Newsgroups: gmane.comp.lang.boo.user
Date: 2005-01-28 21:07:39 GMT
No, I'm not asking to have a class library for Boo besides .Net's one.
What I ask myself is if there is a way to use the same classes but by typing
the method names differently.
Following the same example: upper() is equivalent to ToUpper()
In the same way, there might be many other methods in Python's and .Net's
clase that are equivalent and produce the same behaviour.
What I'm wondering is whether it would be possible (or desirable) to use the
"ToUpper()" method of the .NET's string class by simply typing "upper()" as
I would if I were programming in Python.
Another example:
For getting the type of "a" I type: "a.GetType()", which is equivalent to
"type(a)" in Python.
In this case I could write the following function to make them equivalent:
def type(i as object):
return i.GetType()
The questions are:
- Is there a way to make this function built-into Boo?
- And if posible, is there any inconvenience in doing so?
- And finally, would it be desirable?
----- Original Message -----
From: "Ayende Rahien" <Ayende@...>
To: <user@...>
Sent: Friday, January 28, 2005 5:06 PM
Subject: RE: [boo-user] method names
(Continue reading)
It should be an interesting project, if nothing else, and extensible to
outer areas.
Can any one the compiler knowledgable tell us if this is indeed possible?
> Following the same example: upper() is equivalent to ToUpper()
> In the same way, there might be many other methods in Python's and .Net's
> clase that are equivalent and produce the same behaviour.
> What I'm wondering is whether it would be possible (or desirable) to use
> the
> "ToUpper()" method of the .NET's string class by simply typing "upper()"
> as
> I would if I were programming in Python.
>
> Another example:
> For getting the type of "a" I type: "a.GetType()", which is equivalent to
RSS Feed