On Sun, 11 Oct 2020, Tobias Boege wrote: > On Sat, 10 Oct 2020, William Michels via perl6-users wrote: > > then proceed to process the function call. As it is my understanding that > > Raku incorporates a lot of different programming paradigms (imperative, > > object-oriented, functional, etc.), I'm not sure where this behavior falls > > on the 'paradigm ladder'. > > > > If you want to view it as a matter of paradigm, I guess it would be the > "operator-centric paradigm", except that it is a method and not an operator. > > The Array class inherits methods from Cool and when you call a method from > Cool on the Array, the Cool part of the array will answer the call. The > Array is Cool to advertise that it can be evaluated in numeric and string > "context". In string context, the array becomes joined using spaces as > delimiters. Put more bluntly: when you treat an array like a string > (by calling a string-related method of Cool on it), then Raku treats it > as a string, even if it must convert it to one before. [ This may sound > magical, but in reality Array just obtains the method .split from Cool > and its implementation explicitly converts the invocant, whatever it > may be, to a Stringy on which a sensible split is defined. ] >
Oh, it seems like I was far too slow. From all the other answers, I think Brad put best what I tried to express using many redundant words. And he avoided the historically charged and probably inaccurate term "context". Best, Tobias