From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-31 17:21:40 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0.news.uu.net!reader0.news.uu.net!not-for-mail Sender: DB3L@CTWD0143 Newsgroups: comp.lang.ada Subject: Re: How to make Ada a dominant language References: <9k36ae$138k$1@pa.aaanet.ru> <3B654276.4040707@bigfoot.de> <3B655CE8.F8FAD2CF@sneakemail.com> <87elqxxyzb.fsf@deneb.enyo.de> <3B66D9F8.BA21BC1B@san.rr.com> <3B66E299.FA942B24@san.rr.com> From: David Bolen Date: 31 Jul 2001 20:21:42 -0400 Message-ID: Organization: Fitlinxx, Inc. - Stamford, CT X-Newsreader: Gnus v5.7/Emacs 20.6 NNTP-Posting-Host: 208.247.212.3 X-Trace: reader0.news.uu.net 996625296 7271 208.247.212.3 Xref: archiver1.google.com comp.lang.ada:10901 Date: 2001-07-31T20:21:42-04:00 List-Id: Darren New writes: > > > So how does it deal with the tab/space problem? Why's that a problem for > > > Python and not for the Ada indentation-checking tools? > > > Tab characters are not valid source code characters if this compiler > > option is activated. > > FWIW, Python's approach is to forbid mixing of tabs and spaces in the > same indent block. I.e., you can use some number of tabs per indent, or > some number of spaces per indent, but not both. ITabs vs spaces is > actually a pretty rare complaint, judging from the python newsgroup. Actually, that's not technically Python's approach. The compiler in Python has well-defined rules for handling tabs and spaces. The parser treats a tab as aligning with the next multiple-of-8 boundary. The problems tend to arise when people reprogram their editors to use some non-parser-compliant spread for tab characters, then let the literal tabs get inserted into the source, and then intermix tabs and spaces. The non-standard interval itself is fine if you stick with tabs (since beyond the parser Python only cares that indentation is consistent, not how much it is), but the mixture ends up with the editor showing block structure that doesn't match how the parser will see it. In the end, the general concensus is to just stick with spaces (the major Python editing environments handle this for you transparently). Given that code written in other languages almost always tends to be block oriented and formatted, even when the language itself doesn't care about the block structure, it's really just formalizing something that well written code exhibits anyway, and reduces the variations on a theme that you can see in other language code. By and large, it's really a non-issue, albeit one that can cause vociferous arguments, particularly among those just starting to look at Python. But I would think there's plenty of better points of comparisons with Python than indentation - and no, I don't personally think Ada would be better off adopting a whole bunch of Pythonisms. Both languages are useful, and to be honest, could probably be quite synergistic in many applications. It's already quite common to have a mixture of Python and C/C++ in applications, and there's no good reason why Ada couldn't be in the mix instead. -- -- David -- /-----------------------------------------------------------------------\ \ David Bolen \ E-mail: db3l@fitlinxx.com / | FitLinxx, Inc. \ Phone: (203) 708-5192 | / 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \ \-----------------------------------------------------------------------/