Hi Stef,

On Thu, Aug 17, 2017 at 05:08:40PM +0200, Stephane Ducasse wrote:
> I do not know but I imagine that I added basenameWithoutExtension because
> I found the name much much clearer. I would have never guessed that
> base is the basename without the extension.
> 
> Stef

Thanks for the clarification.  Although #base isn't the name without the
extension, it is the portion of the name up to the first extension
delimiter (for names with a single extension delimiter the two will of
course be the same, but for names with multiple extension delimiters
they will be different).

In that case, assuming no one else comes up with additional
information, I would argue that the issue should be closed (rejected),
and Michael should change his code to use #basenameWithoutExtension
instead of #base.

It would be nice to improve the comments in the code - I'll add it to my
list. :-)


Cheers,
Alistair


> On Wed, Aug 16, 2017 at 9:46 PM, Alistair Grant <[email protected]> wrote:
> > Hi All,
> >
> > I've just taken a look at issue 19609 FileReference>>base should be
> > before last separator and wonder whether it is a correct interpretation
> > of the original intentions.
> >
> > The original author of the issue, Michael, seems to feel that
> > FileReferene>>base and FileReference>>basenameWithoutExtension are the
> > same.
> >
> > My reading of the comments is that they perform a different function,
> > i.e.:
> >
> >
> > '/a/b/c.d.e' asFileReference base.  "c"
> > '/a/b/c.d.e' asFileReference basenameWithoutExtension.  "c.d"
> >
> >
> > are both the expected values, i.e.:
> >
> > - #base answers the name up to the first extensionDelimiter.
> > - #basenameWithoutExtension answers the name without what is typically
> >   considered the file extension (the bit after the last
> >   extensionDelimiter).
> >
> > Not shown above, but:
> >
> > - #basename answers the entire filename, i.e. "c.d.e".
> >
> >
> > Does anyone know the history of these methods?
> >
> >
> > Cheers,
> > Alistair
> >
> 

Reply via email to