That's what I was thinking - borrow the slicing tech from Python, which is very well thought out and widely used already, rather than inventing a new syntax and sematics, etc.
One of the things I hate about C++ is evidenced in most implementations of a "string" class - there's just way too many darn methods that each do almost nothing, and together, promote very wasteful and inefficient programming, for example:
myStrVar.SuperSliceMethod(0, myStrVar.Length() - 3)
When did it become "okay" to have function calls in arg lists, much less, dereferencing class objects and calling overloaded methods + calling constructors and destructors for parent classes + blah + blah + blah. Chances are, in many string classes you see out there, Length() isn't just a simple method which returns a private integer, it's another rats nest of calls to other methods to check nationalization, characters set, blah, blah, blah. Once you start with this innocent little SuperStringClass, and then put hundreds of layers of other things on top of it that use it, you start to see that your program is spending most of it's CPU time calling constructors, destructors and methods of the innocent little string class, under the hood.
This is how C++ (and other similar langs) entice you to program, and it's the main reason why Java sucks dish water...
DOH! I did it now!!!
I'm sure BMax has reasonable implementations of its classes and doesn't use OOP just "for the sake of OOP", but to truly make it more efficient to program, but flexible enough to allow more of the common paradigms.
Ed
"Run away... run away..."
One of the things I hate about C++ is evidenced in most implementations of a "string" class - there's just way too many darn methods that each do almost nothing, and together, promote very wasteful and inefficient programming, for example:
myStrVar.SuperSliceMethod(0, myStrVar.Length() - 3)
When did it become "okay" to have function calls in arg lists, much less, dereferencing class objects and calling overloaded methods + calling constructors and destructors for parent classes + blah + blah + blah. Chances are, in many string classes you see out there, Length() isn't just a simple method which returns a private integer, it's another rats nest of calls to other methods to check nationalization, characters set, blah, blah, blah. Once you start with this innocent little SuperStringClass, and then put hundreds of layers of other things on top of it that use it, you start to see that your program is spending most of it's CPU time calling constructors, destructors and methods of the innocent little string class, under the hood.
This is how C++ (and other similar langs) entice you to program, and it's the main reason why Java sucks dish water...
DOH! I did it now!!!
I'm sure BMax has reasonable implementations of its classes and doesn't use OOP just "for the sake of OOP", but to truly make it more efficient to program, but flexible enough to allow more of the common paradigms.
Ed
"Run away... run away..."