[Vm-dev] FilePlugin>>primitiveFileStdioHandles fails incorrectly?

Alistair Grant akgrant0710 at gmail.com
Mon Aug 27 13:24:50 UTC 2018


Hi Eliot,

On Thu, Aug 09, 2018 at 09:34:21AM -0700, Eliot Miranda wrote:
>  
> Hi Alistair,
> 
> I've got myself going.  I have the R_OK, W_OK, E_OK accessors in place so don't
> need source code.  I do suggest however that primitiveFileAttribute would be
> nicer to use if it took its arguments in reverse order.  i.e.
> 
>     attribute: attributeNumber forPath: path
> 
> is less clumsy than
> 
>     attributeForPath: path numbered: attributeNumber

I've written this as:

    fileAttribute: aString number: attributeNumber


I tend to put the main object first in the parameter list as it helps me
mentally by setting the context, in this case it is the file that we are
operating on.

It could be:

   file: path attributeNumber: anInteger

Which matches the complexity from your reply to Denis (three words in
the selector, six words in the message pattern (although one is "an").

I would actually prefer:

   file: pathString attributeNumber: anInteger

because Pharo has a Path object, which isn't allowed here, it must be a
string.

Do you still feel strongly about swapping the argument order?

Cheers,
Alistair



More information about the Vm-dev mailing list