[chuck-users] Are array types really classes ?

Cyrille.Damez at laposte.net Cyrille.Damez at laposte.net
Thu Sep 3 16:28:34 EDT 2009


On Thursday 03 September 2009 01:54:07 Michael Heuer wrote:

>  I'm curious, what would you want to extend a float[] for?

Very simple things like (algebraic) vectors, list of probabilities, etc. Of 
course I can always make classes that contain just a vector and duplicate 
every needed member functions and operators of float[], but that feels a bit 
silly . 

Moreover, unless there is some way of writing an implicit reference cast 
operator from foo to float[] (again, excuse this possibly trivial question, I 
am learning), I won't be able to use existing functions that take array 
references as parameters directly on foo (I will have to pass the member 
foo.content or trivially overload all of them).

Yes I am lazy :)


More information about the chuck-users mailing list