Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!datapg!com50!jhereg!mark From: mark@jhereg.Minnetech.MN.ORG (Mark H. Colburn) Newsgroups: comp.lang.c Subject: Re: A question of commas Message-ID: <493@jhereg.Minnetech.MN.ORG> Date: 12 Dec 89 20:17:47 GMT References: <257E97F4.24962@ateng.com> <1989Dec7.192215.27671@aqdata.uucp> Reply-To: mark@jhereg.UUCP (Mark H. Colburn) Organization: Open Systems Architects, Inc., Mpls, MN Lines: 25 In article <1989Dec7.192215.27671@aqdata.uucp> sullivan@aqdata.uucp (Michael T. Sullivan) writes: >But more programmers (BASIC, pascal, etc.) use "i = i + 1", and using "i++" >assumes future programmers working with the code know C. Obviously, the >first choice is the correct choice :-|. If the programmers that are maintaining the code do not know about the little details of C, such as post decrement and post increment operators, then they are going to have a really tough time understanding virtually any code that uses the features of the language that make it so desirable. Writing code to the least common denomonator is not a good way to write code. If there are portable features of a language that would be known to a competent programmer in that language, then you should use them. I would say that using techniques which are tricky and unportable should be avoided, unless they are absolutely necessary. You have to assume that the person that is going to be working with your code is fluent in the language that you are using, or that they will be learning quickly! Portability is not just so that code can be moved to differenct architectures and run, but also to allow programmers to move between different architectures and understand code. -- Mark H. Colburn mark@Minnetech.MN.ORG Open Systems Architects, Inc.