From: Sean O'Dell Date: 2003-10-31T04:11:40+09:00 Subject: Re: [ANN] win32-file 0.1.0 On Thursday 30 October 2003 09:59 am, Christoph wrote: > Berger, Daniel wrote: > ... > > > # > > # > > Synopsis > > # > > ======== > > # > > require "win32/file" > > # > > > > # > > some_file = "C:\\Documents and > > # > Settings\\some_user\\fruitylicious.txt" > > # > > > > # > > Win32::File.attributes(some_file) # e.g. > > ['hidden','archive'] # > # > Why not use symbols instead? > > # > > # Dunno - didn't think it really mattered. Does it? > > # > > > > Personally, I generally dislike the symbol-as-hash key > > style--even if there is some kind of performance gain to be > > had from it. So, you've got my vote to keep it as it is. :) > > Just throwing in a curve ball on this frivolous matter, but > I strongly prefer the symbol style over strings. In fact, it > always bucket me that the reflection methods like > Module#instance_methods or Object#instance_variables > return arrays of strings instead of symbols. > > Ps. Thank you very much for all win32 extension - > they are really fantastic! Also what kind of nfts (5+) > features will your win32/file extension support? Actually, shouldn't these be constants of the File class? Something like this maybe: Win32::File.attributes(some_file) -> {File::HIDDEN => true, File::ARCHIVE => true} Sean O'Dell