Re: [AD] Clarifying and revising filesystem API

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Wed April 15 2009, Peter Wang wrote:
> 2009/4/16 Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx>:
> >> % File system hooks
> >>
> >> # File system types
> >>
> >> ## API: ALLEGRO_FILE_HANDLE
> >
> > No. Its not a file. Its an entry. This will just confuse people. Its
> > generic for a reason.
>
> That's why I refrained from ALLEGRO_FILE, but apparently the extra
> "handle" isn't enough.  I don't mind ALLEGRO_FS_ENTRY too much
> (it's unfortunate that "filesystem" is so long).
>
> But _these_ unqualified names really bother me:
>
>     al_get_entry_size, etc.
>     al_is_present, etc.
>
> They could be dealing with absolutely anything.

Indeed. I was never happy with al_is_present. Chatted with people a few times 
about it. it used to be called al_fs_exists (or just exists() in a4).

> Could you live with:
>
>     al_get_fs_entry_size, etc.
>     al_fs_entry_is_present, etc.

I thought that would end up being too long. I don't _mind_ it, but I think 
some of these names are just too long. I tried to leave out the fs when ever 
possible. we could go back to "exists" for the second function to make it a 
little shorter: al_fs_entry_exists, but that might not be quite clear enough, 
I dunno.

But I thought we were trying to get rid of the prefixes? btw, I'm starting to 
find the extra "get"s in some of these functions to be superfluous, its pretty 
obvious in most cases that you're trying to get some property out of the 
object.

> Replies for the rest later.
>
> Peter
>
> ---------------------------------------------------------------------------
>--- Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p


-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/