>I've been dabbling in different languages lately (Python, Ruby on Rails, C#, etc.) and one thing I found that I really like with Ruby is the sequential in-line function calls.
>
>In VFP we work inside out which isn't easy to read:
>
myudf(padr(trim(str(lnVariable)),10))
>
>In Ruby (using VFP methods) the same thing would be like this:
>
lnVariable.str().trim().padr(10).myudf()
>
>The sequential way is SO much more readable. Here's my question. Generically, what do you call this difference/paradigm (as I'm sure it's not called Sequential In-Line Function Calls) ?
In jQuery, this is called chaining, but the meaning is different. The jQuery generally returns an object or a collection of objects. A function then operates on this object or collection, returning the same object (if it did something to it), or a different object (if it's a filter or other kind of selector). So this object returned is then passed to the next function (or we could say it's a method call, because these functions are methods of these objects).
So, not sure whether chaining would apply to your Ruby example, as the semantic is different.