www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/12/18/20:33:29

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=4b6eyyp5A78DuwPVU9c2F1kTcHMuMtA7ERl57RFxiZ0=;
b=JdDwBIBw2dfSGjDYk8Wob3BPv3UjTxTJN09kzJS12Utv3/qUGFo6qXPzGi+uhSx4cm
gP81OvwDFbRwUNMjDDFnbAyTWJg7KKTuPGBgMusMDB+mzgWSv2kmKXIur1oCNE9QhShN
kvVFAmiiNLstD0c6hIs0/MDoctUMfKe4HafjVxZ4gWBrJl5zEmjR+mlpHeHOMkSd3kSj
rgmXIPUXhoBNC31aPnDGzMe+VKxC2B4t+SBO6ef5eiYbZVUXWubMVuirS+jQ54Hb1meA
Nmbc9prlh6oYm53/DmmPdqXogC00yf75Di+tRj7RhlIv+x5stlLAyW6zqTxCcL8ayCOD
WnZQ==
MIME-Version: 1.0
X-Received: by 10.194.6.196 with SMTP id d4mr7006279wja.120.1450488786260;
Fri, 18 Dec 2015 17:33:06 -0800 (PST)
In-Reply-To: <20151217115354.19720.qmail@stuge.se>
References: <CAC4O8c_Jc98kmjDp_O2hKbY9BWWAjGk+nb0L5L=jqXfeTAYGGA AT mail DOT gmail DOT com>
<201512152309 DOT tBFN90dS016514 AT envy DOT delorie DOT com>
<CAC4O8c8jaeiyrD4eEcWAR69GC=nd__gBLfPtstNUfQDAstvBcA AT mail DOT gmail DOT com>
<20151217115354 DOT 19720 DOT qmail AT stuge DOT se>
Date: Fri, 18 Dec 2015 16:33:06 -0900
Message-ID: <CAC4O8c_KiWwseSSdEFw=W0c5ewZscSNiQ7Jxy7d0MuDQyxxgBg@mail.gmail.com>
Subject: Re: [geda-user] merge please (or rebase if you must)
From: "Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

--047d7b5d4976db1b7f0527363c62
Content-Type: text/plain; charset=UTF-8

On Thu, Dec 17, 2015 at 2:53 AM, Peter Stuge (peter AT stuge DOT se) [via
geda-user AT delorie DOT com] <geda-user AT delorie DOT com> wrote:

> Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com] wrote:
> > > I note you use // for comments.  If we're going this route, we should
> > > update configure to test for a C99-compliant compiler.
> >
> > This is probably a pretty safe assumption now.
>
> It isn't, among other platforms for the sake of Windows.
>

Isn't the windows port broken anyway?  And if a pre-C99 is the latest and
greatest available on Cygwin or whatever it is, I probably wouldn't try to
fix it (that way at least).


> Please do not make comments cause a dependency on a C99 compiler if
> nothing else does. Please do stick with /* the classic style */
>

There's other useful stuff in C99.  Declaration at point-of-use and
compound literals both reduce redundancy a lot.  Probably more things we
aren't even aware of have crept in.  It's not a new standard anymore.


> > > In many cases in the geometry module, you use Vec where you mean
> > > Point.  Granted, the data is the same, but the meanings should be
> > > clear to the user, since it's part of the "documentation".
> >
> > It bugs me too.  The C alternatives I'm aware of are:
> >
> >   * use casts wherever a conversion happens.  Not sure how ugly it would
> >     get in this particular case


> If there are two types then two macros are needed to do the two
> possible conversions and if they have reasonable names then it isn't
> very ugly at all.
>

I think the way DJ proposed is good in this case (other post).


> Thank you for your work!
>

It was enjoyable, I hope it will be useful.

Britton


>
>
> //Peter
>

--047d7b5d4976db1b7f0527363c62
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Thu, Dec 17, 2015 at 2:53 AM, Peter Stuge (<a href=3D"mailto:peter AT s=
tuge.se">peter AT stuge DOT se</a>) [via <a href=3D"mailto:geda-user AT delorie DOT com">=
geda-user AT delorie DOT com</a>] <span dir=3D"ltr">&lt;<a href=3D"mailto:geda-use=
r AT delorie DOT com" target=3D"_blank">geda-user AT delorie DOT com</a>&gt;</span> wrote=
:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-le=
ft:1px #ccc solid;padding-left:1ex"><span class=3D"">Britton Kerin (<a href=
=3D"mailto:britton DOT kerin AT gmail DOT com">britton DOT kerin AT gmail DOT com</a>) [via <a hr=
ef=3D"mailto:geda-user AT delorie DOT com">geda-user AT delorie DOT com</a>] wrote:<br>
&gt; &gt; I note you use // for comments.=C2=A0 If we&#39;re going this rou=
te, we should<br>
&gt; &gt; update configure to test for a C99-compliant compiler.<br>
&gt;<br>
&gt; This is probably a pretty safe assumption now.<br>
<br>
</span>It isn&#39;t, among other platforms for the sake of Windows.<br></bl=
ockquote><div><br></div><div style=3D"">Isn&#39;t the windows port broken a=
nyway?=C2=A0 And if a pre-C99 is the latest and greatest available on Cygwi=
n or whatever it is, I probably wouldn&#39;t try to fix it (that way at lea=
st).=C2=A0</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Please do not make comments cause a dependency on a C99 compiler if<br>
nothing else does. Please do stick with /* the classic style */<br></blockq=
uote><div><br></div><div style=3D"">There&#39;s other useful stuff in C99.=
=C2=A0 Declaration at point-of-use and compound literals both reduce redund=
ancy a lot.=C2=A0 Probably more things we aren&#39;t even aware of have cre=
pt in.=C2=A0 It&#39;s not a new standard anymore.</div><div>=C2=A0</div><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #=
ccc solid;padding-left:1ex"><span class=3D"">
&gt; &gt; In many cases in the geometry module, you use Vec where you mean<=
br>
&gt; &gt; Point.=C2=A0 Granted, the data is the same, but the meanings shou=
ld be<br>
&gt; &gt; clear to the user, since it&#39;s part of the &quot;documentation=
&quot;.<br>
&gt;<br>
&gt; It bugs me too.=C2=A0 The C alternatives I&#39;m aware of are:<br>
&gt;<br>
&gt;=C2=A0 =C2=A0* use casts wherever a conversion happens.=C2=A0 Not sure =
how ugly it would<br>
&gt;=C2=A0 =C2=A0 =C2=A0get in this particular case</span>=C2=A0</blockquot=
e><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:=
1px #ccc solid;padding-left:1ex"><span class=3D"">
<br>
</span>If there are two types then two macros are needed to do the two<br>
possible conversions and if they have reasonable names then it isn&#39;t<br=
>
very ugly at all.<br></blockquote><div><br></div><div style=3D"">I think th=
e way DJ proposed is good in this case (other post).</div><div>=C2=A0</div>=
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Thank you for your work!<br></blockquote><div><br></div><div style=3D"">It =
was enjoyable, I hope it will be useful.</div><div style=3D""><br></div><di=
v style=3D"">Britton</div><div>=C2=A0</div><blockquote class=3D"gmail_quote=
" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
//Peter<br>
</blockquote></div><br></div></div>

--047d7b5d4976db1b7f0527363c62--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019