From: "Theodore H. Smith" <[EMAIL PROTECTED]>
Date: Fri, 15 Sep 2006 15:33:13 +0100
Is it possible to make a function name the same as a class name?
For example, if I made a function name like this
function date( s as string ) As date
end function
Sorry, that should be:
Function Date(s as string) As Date
dim d as date
if ParseDate( s, d ) then
Return d
end if
End Function
and:
Function Date() As Date
Return new date
End Function
Basically, the idea is... that ideally I'd like to have static class
functions in RB, just like we can do in C++.
UNFORTUNATELY, RB makes it impossible to name a module the same name
as a class :( So I can't do ElfData.ChrB or something like that,
unless I make an ElfData() global function.
Basically, it's all about name spacing. Name spacing is really the
nice neat modern way of doing things. Prefixes are ugly and don't
look nice.
I'd rather ElfData.ChrB than ED_ChrB
Ideally we'd have full name space support actually, Java style NOT C+
+ style. C++ name spaces are screwed up :)
That way I could write UTF_BOM for most cases. But I could also write
ElfData.UTF_BOM if there happened to be another UTF_BOM function
lying around from another library.
--
http://elfdata.com/plugin/
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>