[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: The no goto religion
From:       "=?ISO-8859-1?Q?F=E1bio_Firmo?=" <fabio.a.firmo () gmail ! com>
Date:       2007-07-31 0:21:57
Message-ID: 2ac835d40707301721x154daa2cg12ab618f231c4a58 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Well, my initial intention was to be just a silent watcher of this
discussion, but I think (and might be wrong) that I have something usefull
to say

First the "technical view", the quotes are there because i'm not technical
enough, but i believe that Aaron is right saying that the most needed
optimizations in KDE (and the majority of desktop programs, i think) aren't
for save a few CPU cycles here and there. So i'm not convinced that this
particular case is relevant (knowing that you said in the first mail that
this is just one example)

Ok, now the second view, the most important one. Code is really a matter of
personal taste, as you all know, there's no need to be a "captain obvious"
here. The fact is that, especially in a open source project, sometimes we
must consider what the majority of the developers think, and not what I
think. Sincerely, this particular case isn't a important thing in the whole
KDE, so doesn't matter which code will be compiled, no one will say: "If it
was my way it would be much better". What i'm trying to say is, this
situation is a "choose the lesser evil" one, as you said; but the lesser
evil for you is not the lesser evil for me. Maybe because I'm just a college
kid that was teach by everyone that goto's are evil, but in my few
experiences in real projects I have also faced some complicaded situations,
and I never felt bad adding one or two lines of redundant code or a new flag
or adding extra exit points. I know that sometimes my choices make the code
a little less efficient, but I know that in some months or years I'll
understand what I write without a second look at the code. The same thing
about my colleague, who probably was told to not use goto's too. The fact is
that with my (very) limited knowlegde about the way that programmers code
today, a non-go-to approach is much more common, and then when these coders
read these lines, they'll say: "Hey, it's a little ugly, but I would do the
same way".

When I (and, I think, all of us) see a situation that _really_ needs a goto,
or some other "bad practice", we'll use it. But when the it's a (almost)
pure taste situation, i think it's better to left the stuff how the most
part of the coders are used to. If you all are more used to a goto in this
situation, so I'll not mind to accept the change.


2007/7/30, James Richard Tyrer <tyrerj@acm.org>:
>
> Allan Sandfeld Jensen wrote:
> > On Sunday 29 July 2007 20:04, Arnold Krille wrote:
> >> BTW: Fighting for goto in C and C++ already shows that you are an old
> >> programmer (from before compilers and checks), no need to state it
> again.
> >> ;-)
> >>
> > No it show you are an experienced and capable programmer, where an
> > unreasonable objection to goto, shows you as either: Stupid, Stubborn or
> just
> > naive and unexperienced ;)
>
> Thank you.
>
> > Do we a flamewar going now?
>
> Well try to take a positive attitude towards flame wars.  I don't take
> them seriously and, therefore, tend to find them entertaining. :-D
>
> --
> JRT
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> unsubscribe <<
>

[Attachment #5 (text/html)]

Well, my initial intention was to be just a silent watcher of this discussion, but I \
think (and might be wrong) that I have something usefull to say<br><br>First the \
&quot;technical view&quot;, the quotes are there because i&#39;m not technical \
enough, but i believe that Aaron is right saying that the most needed optimizations \
in KDE (and the majority of desktop programs, i think) aren&#39;t for save a few CPU \
cycles here and there. So i&#39;m not convinced that this particular case is relevant \
(knowing that you said in the first mail that this is just one example) <br><br>Ok, \
now the second view, the most important one. Code is really a matter of personal \
taste, as you all know, there&#39;s no need to be a &quot;captain obvious&quot; here. \
The fact is that, especially in a open source project, sometimes we must consider \
what the majority of the developers think, and not what I think. Sincerely, this \
particular case isn&#39;t a important thing in the whole KDE, so doesn&#39;t matter \
which code will be compiled, no one will say: &quot;If it was my way it would be much \
better&quot;. What i&#39;m trying to say is, this situation is a &quot;choose the \
lesser evil&quot; one, as you said; but the lesser evil for you is not the lesser \
evil for me. Maybe because I&#39;m just a college kid that was teach by everyone that \
goto&#39;s are evil, but in my few experiences in real projects I have also faced \
some complicaded situations, and I never felt bad adding one or two lines of \
redundant code or a new flag or adding extra exit points. I know that sometimes my \
choices make the code a little less efficient, but I know that in some months or \
years I&#39;ll understand what I write without a second look at the code. The same \
thing about my colleague, who probably was told to not use goto&#39;s too. The fact \
is that with my (very) limited knowlegde about the way that programmers code today, a \
non-go-to approach is much more common, and then when these coders read these lines, \
they&#39;ll say: &quot;Hey, it&#39;s a little ugly, but I would do the same \
way&quot;. <br><br>When I (and, I think, all of us) see a situation that _really_ \
needs a goto, or some other &quot;bad practice&quot;, we&#39;ll use it. But when the \
it&#39;s a (almost) pure taste situation, i think it&#39;s better to left the stuff \
how the most part of the coders are used to. If you all are more used to a goto in \
this situation, so I&#39;ll not mind to accept the change. <br><br><br><div><span \
class="gmail_quote">2007/7/30, James Richard Tyrer &lt;<a \
href="mailto:tyrerj@acm.org">tyrerj@acm.org</a>&gt;:</span><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> Allan Sandfeld Jensen wrote:<br>&gt; On Sunday 29 \
July 2007 20:04, Arnold Krille wrote:<br>&gt;&gt; BTW: Fighting for goto in C and C++ \
already shows that you are an old<br>&gt;&gt; programmer (from before compilers and \
checks), no need to state it again. <br>&gt;&gt; ;-)<br>&gt;&gt;<br>&gt; No it show \
you are an experienced and capable programmer, where an<br>&gt; unreasonable \
objection to goto, shows you as either: Stupid, Stubborn or just<br>&gt; naive and \
unexperienced ;) <br><br>Thank you.<br><br>&gt; Do we a flamewar going \
now?<br><br>Well try to take a positive attitude towards flame wars.&nbsp;&nbsp;I \
don&#39;t take<br>them seriously and, therefore, tend to find them entertaining. \
:-D<br><br>--<br> JRT<br><br>&gt;&gt; Visit <a \
href="http://mail.kde.org/mailman/listinfo/kde-devel#unsub">http://mail.kde.org/mailman/listinfo/kde-devel#unsub</a> \
to unsubscribe &lt;&lt;<br></blockquote></div><br>



>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic