1. A computer-implemented method of processing data, said method comprising: providing an a stream processing object class definition of a stream processing object class for facilitating at least one operation on a data stream, the object class definition specifying operations defining at least a portion of an Application Programming Interface (API), the object class definition including at least an update operation for updating a retained internal state of an object instance of the stream processing object class without producing an output, a stream processing operation, and an output operation for producing at least one output value for an object instance of the stream processing object class, the update operation and output operation being separately invocable; instantiating an object of the stream processing object class in a textual dynamically-typed language environment to produce an object instance; and using the object instance to operate on the data stream via the API; and generating code for the object instance based on a set of parameters.