Article View: alt.folklore.computers
Article #620904Re: Computer science hot major in college (article)
From: J. Clarke
Date: Tue, 27 Feb 2018 02:14
Date: Tue, 27 Feb 2018 02:14
36 lines
2915 bytes
2915 bytes
On 26 Feb 2018 16:25:37 GMT, Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote: >On 2018-02-25, Ahem A Rivet's Shot <ste...@eircom.net> wrote: > >> On Sun, 25 Feb 2018 09:01:08 -0500 >> Dan Espen <dan1...@gmail.com> wrote: >> >>> Gareth's Downstairs Computer >>> <headstone255.but.n...@yahoo.com> writes: >>> >>>> The major failing of C as a high level language is that logical >>>> and relational AND and OR operators are at the same precedence whereas >>>> logical should be higher thus ridding the necessity of extra brackets. >>> >>> Hmm, code that relies on precedence rather than parens is not good code. >>> IMO. >> >> So use LISP :) >> >> You can go too far though, I think it's fair to assume BODMAS in >> any language with infix notation, and to assume that assignment comes way >> down the list in languages where an assignment is also an expression. > >BODMAS? Haven't heard that one. Explain, please. > >In my C code I use a few more parentheses than are strictly necesary, e.g. > if((i > 0) && (i < 10)) >but at least there's no ambiguity, and I think it's more readable. > >The other argument for extra parentheses is that it can save some pain >if you port the code to another language with different precedence rules. I go back and forth between APL, Visual Basic, C, and Python. I finally gave up and started using parens to avoid having to constantly shift mental gears.
Technical Details
Message-ID:
<plf99dlif2fds08mf2tu317bcbv4blt4ta@4ax.com>Path:
mbox-mo1.pugleaf.net!m4ni18qte.0!nntp.google.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!post02.iad!fx44.iad.POSTED!not-for-mailReferences:
<8242dc95-b34a-426b-8502-a1df37f19358@googlegroups.com> <p6knl7$q2i$1@dont-email.me> <slrnp8rud9.2k6.mausg@smaus.org> <p6lsvq$4cn$1@dont-email.me> <AlvjC.134645$Tz3.91192@fx25.am4> <ff7i4iFhdnlU16@mid.individual.net> <p6m6ki$vel$1@dont-email.me> <p6ufj4$jbf$5@dont-email.me> <20180225150303.f5a9e53f362b44cb375cece4@eircom.net> <p71ce13c90@news2.newsguy.com>Show Full Headers
Complete Article Headers
X-Received: by 10.55.151.68 with SMTP id z65mr9658924qkd.30.1519697685168; Mon, 26 Feb 2018 18:14:45 -0800 (PST) X-BeenThere: alt.folklore.computers@googlegroups.com Received: by 10.55.154.20 with SMTP id c20ls41452qke.8.gmail; Mon, 26 Feb 2018 18:14:43 -0800 (PST) X-Received: by 10.55.166.4 with SMTP id p4mr6488725qke.15.1519697683495; Mon, 26 Feb 2018 18:14:43 -0800 (PST) Path: mbox-mo1.pugleaf.net!m4ni18qte.0!nntp.google.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!post02.iad!fx44.iad.POSTED!not-for-mail From: J. Clarke <jclarke...@gmail.com> Newsgroups: alt.folklore.computers Subject: Re: Computer science hot major in college (article) Message-ID: <plf99dlif2fds08mf2tu317bcbv4blt4ta@4ax.com> References: <8242dc95-b34a-426b-8502-a1df37f19358@googlegroups.com> <p6knl7$q2i$1@dont-email.me> <slrnp8rud9.2k6.mausg@smaus.org> <p6lsvq$4cn$1@dont-email.me> <AlvjC.134645$Tz3.91192@fx25.am4> <ff7i4iFhdnlU16@mid.individual.net> <p6m6ki$vel$1@dont-email.me> <p6ufj4$jbf$5@dont-email.me> <20180225150303.f5a9e53f362b44cb375cece4@eircom.net> <p71ce13c90@news2.newsguy.com> User-Agent: ForteAgent/8.00.32.1272 MIME-Version: 1.0 Lines: 36 X-Complaints-To: ab...@newsdemon.com NNTP-Posting-Date: Tue, 27 Feb 2018 02:14:42 UTC Organization: http://www.NewsDemon.com Bytes: 2337 Date: Mon, 26 Feb 2018 21:14:42 -0500 X-Received-Bytes: 2399 X-Received-Body-CRC: 4237378938 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit