<div dir="ltr"><div>No intention to offend, but that is just silly. C doesn't have properties, yet "the curse" is absent. You are essentially also bashing structures, etc.</div><div>OO is great, functional programming is great, procedural programing is great, etc, etc, but if you force user to use only one of them or claim any one of them is superior, you are talking about religion, not practical programming.</div><div>They all have their strong and weak sides, and you should use them accordingly.</div><div><br></div><div><br></div><div>Jussi<br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 8, 2018 at 4:36 PM Me <<a href="mailto:adamnt42@gmail.com">adamnt42@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, 8 Oct 2018 09:22:59 +0200<br>
Benoît Minisini <<a href="mailto:g4mba5@gmail.com" target="_blank">g4mba5@gmail.com</a>> wrote:<br>
<br>
> Le 08/10/2018 à 08:58, Tobias Boege a écrit :<br>
> > On Mon, 08 Oct 2018, Fabien Bodard wrote:<br>
> >><br>
> >> Yes I'm agree...<br>
> >><br>
> >> Benoit,<br>
> >><br>
> >> Why not a syntactic sugar like<br>
> >><br>
> >> PROPERTY MyProperty As String TO sVar<br>
> >><br>
> >> ???<br>
> > <br>
> > That one (or something close to it) has been proposed and "accepted" in the<br>
> > bugtracker already [1]. It isn't implemented yet.<br>
> > <br>
> > Regards,<br>
> > Tobi<br>
> > <br>
> > [1] <a href="https://lists.gambas-basic.org/pipermail/bugtracker/2018-July/000180.html" rel="noreferrer" target="_blank">https://lists.gambas-basic.org/pipermail/bugtracker/2018-July/000180.html</a><br>
> > <br>
> <br>
> ...but all that is not related to the discussion with Jussi: whether <br>
> overriding public variables should be allowed or not. I think this is <br>
> useless, that they should not, and it will help the JIT compiler.<br>
> <br>
> Regards,<br>
> <br>
> -- <br>
> Benoît Minisini<br>
> <br>
> ----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
<br>
Forgive me for wading in on this, but<br>
<br>
Public variables are a curse. They will come back and bite you when you least expect it.<br>
There is no control. None. It's a bit like leaving your wallet on a bar thinking "Oh, no-one<br>
will touch that."<br>
Yes, having to declare a simple property that only exposes a state variable is so much of a <br>
pain. Oh, it takes an inordinate amount of keystrokes, probably about 20 or so. But, consider<br>
the amount of effort that goes into finding the bit of code that someone else wrote that used <br>
a particular value of that variable "because it was handy".<br>
<br>
Enough. Yes dont let them be overridden, better still ban the damn things in any class that has the<br>
magic word "Export" in it.<br>
<br>
Trust me on this. I know. Once upon a time I thought that an exposed boolean was safe. Ha! We <br>
had a young guy working for us that found a "magic" way to use specific negative values as flags <br>
with the obvious later disasters. <br>
<br>
The only thing that should ever be exposed unprotected is a constant. <br>
(I don't know whether it is possible to override a constant? And I'm not about to try. ....<br>
AAAARRGH Override a constant with a public variable??? The mind boggles.)<br>
<br>
Anyway. Sorry for butting in.<br>
<br>
cheers<br>
b<br>
<br>
-- <br>
<a href="mailto:adamant42@gmail.com" target="_blank">adamant42@gmail.com</a><br>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</blockquote></div>