« Return to Thread: Make InputStreamResource parameterless

Re: Re: Make InputStreamResource parameterless

by Stepan Koltsov :: Rate this Message:

Reply to Author | View in Thread

Hi,

sorry for the late answer.

===
def readXml(isr: InputStreamResoure[InputStream]) = ...
===

Is too long (unnecessary complex).

===
def readXml(isr: InputStreamResource) = ...
===

is much easier to write.

I'm proposing to make InputStreamResource work only with InputStream,
not BufferedInputStream or any other InputStream.

Currenly InputStreamResource is:

===
abstract class InputStreamResource[+I <: InputStream] ...
===

I'd like to make it:

===
abstract class InputStreamResource ...
===

S.

On Fri, Nov 28, 2008 at 22:11, Jorge Ortiz <jorge.ortiz@...> wrote:

> Also, what code do you find unnecessarily complex? Code in scalax or your
> own code?
>
> On Fri, Nov 28, 2008 at 11:06 AM, Jorge Ortiz <jorge.ortiz@...> wrote:
>>
>> Those types are passed on to ManagedResource which uses them in a fair
>> number of methods.
>>
>> I guess I'm not sure exactly what your proposing. Make a patch and e-mail
>> it to the list before committing any major changes?
>>
>> --j
>>
>> On Fri, Nov 28, 2008 at 10:38 AM, Stepan Koltsov <yozh@...> wrote:
>>>
>>> OK, nobody against, I'll it :)
>>>
>>> S.
>>>
>>> On Mon, Nov 24, 2008 at 02:51, Stepan Koltsov <yozh@...> wrote:
>>> > Hi, all.
>>> >
>>> > I'd like to make InputStreamResource and friends parameterless (i. e.
>>> > WriterResource will work only with Writer).
>>> >
>>> > I find parametrization useless, and code using this class unnecessary
>>> > complex.
>>> >
>>> > What do you think?

 « Return to Thread: Make InputStreamResource parameterless