[Gambas-user] Better use of prefixes

Jussi Lahtinen jussi.lahtinen at gmail.com
Sun Mar 17 19:06:25 CET 2019


> No, you have no control over where your code may end up, nor how intact.
> Believing that it will always be whole and an appropriate IDE available is
> tenuous at best.
>

Why should I care?? I only provide the code as it is meant to be used, if
someone chooses to mess with the code, it is their problem and fault.
There is no way to prevent messing of your code if it is open source. Nor
there should be a way.


Having procedure separators explicitly in the code is more powerful.  They
> are there.  Obviously they are useful or the IDE wouldn't provide them *as
> an option*.  I shut then off in VB, and I shut them off in Gambas, and rely
> on the text for the separator.
>

You turn the automatic feature off, so that you could do all the
unnecessary work manually. Not interested.



> A test cradle is for development and unit testing.  That is exactly what
> that one does.  How would you structure one any differently?  The classes
> need a form to be tested on.
>

Well, it is not clear from the code that it is merely a test for the
classes.


The main benefits of my convention, compared to the current one, are
> specification of variable scope and a reduction of "symbols" and "cryptic
> abbreviations" to improve comprehensibility.  If you don't know what
> abbreviations stand for, then the code becomes undecipherable.
>

And yet it's you who wants the cryptical stuff; my, ret, Our, etc, which
doesn't really add anything usable.


Your ease of reading shorter names argument is premised on a foreknowledge
> of abbreviation meanings.  To me, that is a faulty assumption.  And a
> burden on the reader to make them learn them.
>

They are abbreviations, thus they can be figured out from reading code.
Everything requires learning. It's not immediately clear what is ComboBox
until you see one. What you suggest doesn't really change the learning
curve.



> ..., is an abstraction made to be human readable.
>

Of course, but what you don't seem to be able to understand, is that your
convention does not do that in opinion of other programmers.



> ...  building "complicated" lines is a bad idea, and you are better off
> breaking it apart and introducing a few local variables for clarity.
>

Yes, but it doesn't need to be that complex, when long variable names turns
into nuisance.



> Ummm, "Temp" usually means "Temporary", gotcha.
>

Depends on context, which you gave me (temperature). Normally the context
comes from the code.


Jussi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20190317/c8c39a26/attachment-0001.html>


More information about the User mailing list