[clug] Why isn't Java popular on the Linux Desktop?

Francis James Whittle fudje at grapevine.net.au
Tue Jul 14 07:50:40 MDT 2009


On Tue, 2009-07-14 at 18:53 +1000, Sam Couter wrote:
> Files are bytes on a disk. They can be streamed, but they aren't a
> stream themselves. A network socket is a stream. Many devices such as TV
> tuners are streams. They're different from files, even though (on
> UNIX-like systems) they have file names.

So please explain to me a scheme for writing to or reading from files
that does not involved streaming?  Files are bytes on disk until you
have to do something to them, then they're bytes being streamed about
the place.

> > Even Java admits this, because a file is an extension of a
> > stream.
> 
> http://java.sun.com/javase/6/docs/api/java/io/File.html says:
> 
> """
> public class File
> extends Object
> implements Serializable, Comparable<File>
> 
> An abstract representation of file and directory pathnames.
> """
> 

Hmm.  Yes.  I must've been thinking of some other language that doesn't
annoy me.

> > So it makes sense to either (a) extend the file to have a
> > buffered variant, or (b) have flags on the file to determine whether we
> > need buffering or not.
> 
> (c) have a class that knows how to stream bytes from a file, so files
> can be files and don't need to know about streaming.

I guess it's just my personal whinging there really.  I don't like
having to write exactly the same extra code for every project because
the language won't "just do" file I/O.  To my mind it's a step backwards
to not just be able to treat an opened file object as a stream.

> Files dealing with files and streams dealing with streaming isn't OO?

Not OO or not OO enough in this particular system?  I said it's LIKE it
isn't because while it is OO, there's OO concepts that could have been
used that haven't.



More information about the linux mailing list