On Oct 29, 2009, at 9:49 PM, Jochen Theodorou wrote:
>>>
>> Dunno, just added Reader methods for everything that had
>> InputStream. Though looks like GCS.getInputStream() isn't used.
>
> it is not used because it is a deprecated method anyway.
How can you say it is unused? Its like GroovyShell.initializeBinding
() perhaps unused internally, but its public so who knows. It
certainly appears useless though.
> All the InputStream taking methods are deprecated. Instead the
> String taking methods are to be prefered. I am not sure we then need
> the Reader logic. I hate it if APIs explode just because variants
> are added with the thought of alinging something, and then that
> stuff is not even used.
Give me a break about exploding apis, Groovy is an API leaking
machine. Its got a ton of optional goodies (someone might need/want/
use) but I will probably never need them.
And I would not even really care if I didn't actually want those
Reader methods! Guillaume mentioned he was looking for them as well.
> In fact I am for removing the reader stuff unless there is a use
> case for it that cannot be done using the String approach (which I
> doubt) or which makes the handling using String very complicated.
I think String and Reader is to be expected input for integration
layers for scripting interfaces, ie. javax.script.ScriptEngine exposes
both... BTW does not expose file, which IMO is a function of a
FileReader, optionally buffered as the caller sees fit. Exposing a
File version is akin to exposing an InputStream version that simply
wraps into an InputStreamReader and uses the Reader methods... purely
for ease of use.
> The only advantage of the Reaer approach could be that you don't
> need to keep the source in memory, but if the implementation just
> reads the text in and then does a compilation with the string in the
> end, then I don't see any benefit.
Right well, as I said before I think that is fundamentally broken.
--jason
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email