2018-01-03 19:04 GMT+01:00 Eliot Miranda eliot.miranda@gmail.com:
On Tue, Jan 2, 2018 at 2:42 AM, Alistair Grant akgrant0710@gmail.com wrote:
On 2 January 2018 at 06:46, Jakob Reschke forums.jakob@resfarm.de wrote
Am 02.01.2018 04:43 schrieb "Eliot Miranda" eliot.miranda@gmail.com:
... inst vars such as sCOFfn are set up in initialiseModule. You're querying the SecurityPlugin on every access as in
canStatFilePath: aPathCString length: length ... (hasSecurityPlugin = 0) ifTrue: [^ true]. sCOFfn := interpreterProxy ioLoadFunction: 'secCanOpenFileOfSizeWritable' From: 'SecurityPlugin'. sCOFfn ~= 0 ...
I have never looked at this before, so: can this variable name be spelled out, please, so it becomes legible for the uninitiated folk?
I've made this change in my image, so it will flow through on the next update.
I don't think it's necessary. The long vars are unwieldy and I'm sure Jakob understands the convention now.
Actually I did figure this out myself, but nevertheless I think it unnecessarily complicates reading the code when things are abbreviated. Even if you already know/knew what it stands for. In the case of "sCOF", I would probably have to look the meaning up again every time I return to that code after a few months, if I were to do that.
Sure, this is a matter of style preferences, but I consider it suboptimal if you have to think harder to understand something when it could also have been made clear and easy at writing time (without sacrificing functionality and performance too much, of course). Please spare the newcomer readers some "wtf" moments if you can. ;-) Especially for things like inst vars, whose initialization (and explanation) may be far away from their usage.
Kind regards, Jakob