Hello,

(completely new to D and to the list)

I just read the following in the doc about arrays at 
http://www.digitalmars.com/d/2.0/arrays.html:

=========================
If the first parameter to a function is an array, the function can be called as 
if it were a property of the array:

int[] array;
void foo(int[] a, int x);
foo(array, 3);
array.foo(3);   // means the same thing
=========================

Does this OO-like syntax also work with other parameter types? Else, why not? I 
mean, also, why allow it for arrays?
(Comment: Unifying syntax for type-specific "function-methods" would simplify 
and clarify code, don't you think?).

Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com

Reply via email to