[NewbieQ] Why are the methods for filing in code in the generic FileStream hierarchy?

Lex Spoon lex at cc.gatech.edu
Mon Feb 7 22:43:37 UTC 2000


Well, you can file in from any stream.  It's not even limitted to files.
 Thus, it makes sense to put fileIn up in class Stream.

Even if you end up needing a special supporting class to do fileins, it
seems nice to have a centralized Stream>>fileIn method which does all
the magic.


Lex




"John-Reed Maffeo" <rlpa80 at email.sps.mot.com> wrote:
> Why are the methods filing in code in the generic FileStream hierarchy?
> 
> I am in the process of creating a sub-class of StandardFileStream and
> this question has crossed my mind.
> 
> It seems that the gereric/abstract super classes for file streams should
> not be burdened with methods which apply only to a specific application.
> I thought that application specific code should be in a sub class (which
> is what I am doing.)
> 
> Am I wrong to expect that the hierarchy would be something like this:
> 
> FileStream
> 	StandardFileStream
> 	HTMLFileStream
> 	GraphicsFileStream	
> 		GZIPFileStream
> 		JPEGFileStream
> 	FileInStream
> 		BangFileInStream
> 		SifFileInStream
> 
> Thanks,
> 
> John-Reed Maffeo
> Mesa, AZ





More information about the Squeak-dev mailing list