[Gambas-user] Better use of prefixes

Cedron Dawg cedron at exede.net
Sat Mar 16 21:35:41 CET 2019


You have to recognize that you are as entrenched in your coding style as I am in mine.

If you prefer abbreviations to full names, that is fine and I won't change your mind over that I am sure.

What is used across the entire project could be changed mechanically with an intelligent search and replace, so that is an argument without foundation.  What people are used to, that has inertia and is a different matter entirely.  And that is what I am trying to sway.

You say I am arguing because it is what "I" am used to.  No, not at all, not once have I said "because I like it better", I am giving specific rationale for each convention, mostly grounded in the concept of readability and comprehensibility.  And from the perspective of a beginner/outsider.  Those may not be important considerations to you.

If you blindly follow any policy without understanding its rationale, you are bound to screw something up at some point.  I have no problem following code written in just about any style on any platform and have been doing it for many many years.  My habit, when doing maintenance work has also been try to follow the style of the existing code as much as possible.  Doesn't mean I like it.

However, when I am wading for the first time into code I have to update, that I didn't write, having meaningful names makes it a lot easier for me to grok (Yes, I'm a Heinlein fan too) what is going on than to have to figure out what each short name stands for, or chasing down every #define.

I disagree with your Mr. Monk.

Doing something the way everybody does it, just because, is a logical fallacy known as "Argumentum ad populum" and has never flown with me.

The "I'm crazy" thing is a lark coming off the signature I read here on this list.

My guess is that you are more comfortable coding in C, using braces, instead of cluttering up your code with all those keywords.  The idea behind the original BASIC, and I believe that Gambas should follow, is that it should be readable and comprehensible.  You see long identifiers as a barrier to comprehensibility; I can't argue against that.  However, I don't think that is a universal sentiment.

Don't get angry, this is just a debate.


----- Original Message -----
From: "Tobias Boege" <taboege at gmail.com>
To: "user" <user at lists.gambas-basic.org>
Sent: Saturday, March 16, 2019 3:45:39 PM
Subject: Re: [Gambas-user] Better use of prefixes

On Sat, 16 Mar 2019, Cedron Dawg wrote:
> More readable for whom?
> 
> Even between those two references there is disagreement on what the prefixes should be.  That's what I meant by non-standardized.
> 
> I am crazy,
>

Yes, if you think that people give up the coding style used across the
entire project with (note!) success for no other reason than because
you come along and insist that it's no good and yours is better.

I've had enough lectures about this from you, on the list and in private,
to which I did not respond because I was too agitated to -- not before
but too far past the boiling point where I would reply anyway.

I like to live and let live. People usually think about coding style
at some point and afterwards it becomes muscle memory. I let them use
whatever they like and assimilate if I contribute fixes to their code.
That's just courtesy.

Even being non-standardised is _fine_. Whether someone calls their
TextBox txtInput or txbInput or tboxInput or InputTextBox or even
ourInputTB, I can handle that, I'm a human after all.

> I think everybody should do it my way because it is demonstrably superior.
> 

All I see is you explaining how it helps *you* read code and that it
makes more sense to *you*. I for one very strongly dislike how it looks,
and that is still an understatement. It overloads identifiers with
information that I never needed to know, like a coarsened version of
lexical scope or whether a variable was passed in as an argument or
if it is a return value. How that simplifies understanding code any
further than descriptive variable name "payload", I fail to see.

When I look at your code, all I see is indistinct "clutter" because 90%
of it are identifier names now. A function that was easy to grok before
now looks like I should maybe go to lunch before diving into "that".

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk

----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----


More information about the User mailing list