harry | 5 Jun 14:41 2013
Picon

doesFileExist and doesDirectoryExist overly verbose?

doesFileExist and doesDirectoryExist seem overly verbose - wouldn't
fileExists and directoryExists be better?

Not a major issue, but easily fixed.

--
View this message in context: http://haskell.1045720.n5.nabble.com/doesFileExist-and-doesDirectoryExist-overly-verbose-tp5731224.html
Sent from the Haskell - Libraries mailing list archive at Nabble.com.
Jeremy Shaw | 5 Jun 14:47 2013

Re: doesFileExist and doesDirectoryExist overly verbose?

but then what do you name the thing you bind it to?

   do fileExists <- doesFileExist
       if fileExists then ...

On Wed, Jun 5, 2013 at 7:41 AM, harry <voldermort <at> hotmail.com> wrote:
> doesFileExist and doesDirectoryExist seem overly verbose - wouldn't
> fileExists and directoryExists be better?
>
> Not a major issue, but easily fixed.
>
>
>
> --
> View this message in context: http://haskell.1045720.n5.nabble.com/doesFileExist-and-doesDirectoryExist-overly-verbose-tp5731224.html
> Sent from the Haskell - Libraries mailing list archive at Nabble.com.
>
> _______________________________________________
> Libraries mailing list
> Libraries <at> haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
Michael Snoyman | 5 Jun 14:49 2013

Re: doesFileExist and doesDirectoryExist overly verbose?

I'm personally quite fond of system-fileio's naming scheme: isFile and isDirectory. Actually, I generally find system-fileio and system-filepath to be a great set of libraries for most file operations.


On Wed, Jun 5, 2013 at 3:41 PM, harry <voldermort <at> hotmail.com> wrote:
doesFileExist and doesDirectoryExist seem overly verbose - wouldn't
fileExists and directoryExists be better?

Not a major issue, but easily fixed.



--
View this message in context: http://haskell.1045720.n5.nabble.com/doesFileExist-and-doesDirectoryExist-overly-verbose-tp5731224.html
Sent from the Haskell - Libraries mailing list archive at Nabble.com.

_______________________________________________
Libraries mailing list
Libraries <at> haskell.org
http://www.haskell.org/mailman/listinfo/libraries

_______________________________________________
Libraries mailing list
Libraries <at> haskell.org
http://www.haskell.org/mailman/listinfo/libraries
Erik Hesselink | 5 Jun 15:06 2013
Picon

Re: doesFileExist and doesDirectoryExist overly verbose?

Those names suggest checks to see if something is a file or directory,
not existence checks.

Regarding the original question: I don't think this should be changed,
because the current names aren't that bad, and changing them would
break a lot of code.

Erik

On Wed, Jun 5, 2013 at 2:49 PM, Michael Snoyman <michael <at> snoyman.com> wrote:
> I'm personally quite fond of system-fileio's naming scheme: isFile and
> isDirectory. Actually, I generally find system-fileio and system-filepath to
> be a great set of libraries for most file operations.
>
>
> On Wed, Jun 5, 2013 at 3:41 PM, harry <voldermort <at> hotmail.com> wrote:
>>
>> doesFileExist and doesDirectoryExist seem overly verbose - wouldn't
>> fileExists and directoryExists be better?
>>
>> Not a major issue, but easily fixed.
>>
>>
>>
>> --
>> View this message in context:
>> http://haskell.1045720.n5.nabble.com/doesFileExist-and-doesDirectoryExist-overly-verbose-tp5731224.html
>> Sent from the Haskell - Libraries mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Libraries mailing list
>> Libraries <at> haskell.org
>> http://www.haskell.org/mailman/listinfo/libraries
>
>
>
> _______________________________________________
> Libraries mailing list
> Libraries <at> haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
harry | 5 Jun 15:25 2013
Picon

Re: doesFileExist and doesDirectoryExist overly verbose?

Erik Hesselink wrote
> Regarding the original question: I don't think this should be changed,
> because the current names aren't that bad, and changing them would
> break a lot of code.

I wasn't suggesting removing the original names, just alias them to the new
ones.

--
View this message in context: http://haskell.1045720.n5.nabble.com/doesFileExist-and-doesDirectoryExist-overly-verbose-tp5731224p5731228.html
Sent from the Haskell - Libraries mailing list archive at Nabble.com.
Michael Snoyman | 5 Jun 17:07 2013

Re: doesFileExist and doesDirectoryExist overly verbose?

Just to clarify: I'm not arguing for any changes to directory here, I think it should remain as is. That includes not adding in additional aliases. While I *prefer* the names in system-fileio, I don't consider it significant enough to touch a core library.

As for isFile not implying an existence check: I've never had that confusion. A path can't be a file unless it exists, so to me `isFile` *does* in fact imply existence as well.


On Wed, Jun 5, 2013 at 4:06 PM, Erik Hesselink <hesselink <at> gmail.com> wrote:
Those names suggest checks to see if something is a file or directory,
not existence checks.

Regarding the original question: I don't think this should be changed,
because the current names aren't that bad, and changing them would
break a lot of code.

Erik


On Wed, Jun 5, 2013 at 2:49 PM, Michael Snoyman <michael <at> snoyman.com> wrote:
> I'm personally quite fond of system-fileio's naming scheme: isFile and
> isDirectory. Actually, I generally find system-fileio and system-filepath to
> be a great set of libraries for most file operations.
>
>
> On Wed, Jun 5, 2013 at 3:41 PM, harry <voldermort <at> hotmail.com> wrote:
>>
>> doesFileExist and doesDirectoryExist seem overly verbose - wouldn't
>> fileExists and directoryExists be better?
>>
>> Not a major issue, but easily fixed.
>>
>>
>>
>> --
>> View this message in context:
>> http://haskell.1045720.n5.nabble.com/doesFileExist-and-doesDirectoryExist-overly-verbose-tp5731224.html
>> Sent from the Haskell - Libraries mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Libraries mailing list
>> Libraries <at> haskell.org
>> http://www.haskell.org/mailman/listinfo/libraries
>
>
>
> _______________________________________________
> Libraries mailing list
> Libraries <at> haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>

_______________________________________________
Libraries mailing list
Libraries <at> haskell.org
http://www.haskell.org/mailman/listinfo/libraries

Gmane