op_Addition for String

1 view
Skip to first unread message

James Caska

unread,
Sep 21, 2014, 1:17:31 PM9/21/14
to boo...@googlegroups.com
Hi,

I am working my way through Boojay and figuring out workarounds to problems as I go along so I can get to a useful version before I come back through and try to fix some of the issues myself

A very common operator that I can't figure out a work around for is the string + overload

The closes I have come is to add the op_Addition operator to the JavaTypeSystem.boo file and this does seem to influence the compile time error but doesn't stop the error

Any help would be greatly appreciated. This is one of the last 'show stoppers' and even this I have found I can work around with string interpolation but I would really like a string + operator in the first release.

Thanks!

class JavaLangString(java.lang.Character*):

self[index as int] as char:
get: raise System.NotImplementedException()
Length as int:
get: raise System.NotImplementedException()
def GetEnumerator():
pass
def System.Collections.IEnumerable.GetEnumerator():
pass
        static def op_Addition(a as System.String, b as System.String) as System.String:
                return self
def toUpperCase():
return self
Reply all
Reply to author
Forward
0 new messages