Groups | Search | Server Info | Login | Register


Groups > comp.programming > #7873

Re: [BBC] Programmers who use spaces 'paid more'

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "Pascal J. Bourguignon" <pjb@informatimago.com>
Newsgroups comp.programming, comp.lang.clipper, comp.lang.c, comp.lang.ada, comp.databases.xbase.fox, alt.conspiracy
Subject Re: [BBC] Programmers who use spaces 'paid more'
Date Wed, 21 Jun 2017 18:48:22 +0200
Organization Informatimago
Lines 53
Message-ID <m2k2458ey1.fsf@informatimago.com> (permalink)
References <oi5vui$cva$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding quoted-printable
X-Trace individual.net TlpzCDb+L/X1hasXiLpOSAonFt0/PESrMSOTZsLqMncrzOSTTX
Cancel-Lock sha1:Njg2MzA2NzNiYTRiYjhiY2Q3NDJhNjZkMDZkMThhNDU1ZmE1NDM3Yg== sha1:cEBXItg5Dep2jZd7wzBIoKa41nw=
Face iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg==
X-Accept-Language fr, es, en
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin)
Xref csiph.com comp.programming:7873 comp.lang.clipper:1318 comp.lang.c:112803 comp.lang.ada:33907 comp.databases.xbase.fox:93 alt.conspiracy:292688

Cross-posted to 6 groups.

Show key headers only | View raw


"Mr. Man-wai Chang" <toylet.toylet@gmail.com> writes:

> Computer programmers who use spaces as part of their coding earn
> $15,370 (£12,000) more per year than those who use tabs, a survey of
> developers has revealed.
>
> Full story: <http://www.bbc.com/news/technology-40302410>

It is said that line prefixes in the form of: TAB* SPC{0,tw-1}
are the best of both world.

This is false.

First, you would need an editor to enforce it.

But it doesn't even solve the first problem of TAB, that their width
varies depending on tools and devices.

The problem is that the sequence of spaces must be of a length less than
the TAB width.  So if you start with tw₀ and have sequences of SPC of
length tw₀-1, and you read/process the file on another system using
tw₁<tw₀, then you will get wrong indentations.

Furthermore, when you allow TAB in source files, you may also use them
to align columns of code, eg. to align variable names in one column, and
types in another column.  And for those TAB in the middle of the lines,
the above rule is helpless, and again, you will get wrong indentations
in other environments, but also IN THE SAME ENVIRONMENT, where the TAB
width is kept constant, as soon as you use a different FONT, notably
when you use non-proportional fonts.

I know that it may seem heritic to use non-proportional fonts for code,
but the reality is that it can work very well, as long as you solve in
the IDE those problems of indentation, both prefix and inside a line.

And, it means the editor will have to compute the layout all the time,
from the parse tree.

Which leads me to the conclusion that the origin of a lot of problems is
the fact that we save "source" files that are used as-is both for
human presentation/edition and for machine processing (compiling).  I
would propose the alternative to save the programs eg. in the form of an
abstract syntactic tree (let's say lisp S-expressions), and each time it
is loaded in an IDE/editor, it would be unparsed into the specific
syntactic and layout/indenting preferences of the programmer; and when
saved, the programmer specific syntax would be parsed, and the
S-expression syntactic tree would be saved to the file.  Machine
processing can use directly these S-expression forms.

-- 
__Pascal J. Bourguignon
http://www.informatimago.com

Back to comp.programming | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

[BBC] Programmers who use spaces 'paid more' "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-18 21:45 +0800
  Re: [BBC] Programmers who use spaces 'paid more' Per Sandberg <per.s.sandberg@bahnhof.se> - 2017-06-18 22:13 +0200
    Re: [BBC] Programmers who use spaces 'paid more' "J. Clarke" <j.clarke.873638@gmail.com> - 2017-06-18 19:03 -0400
      Re: [BBC] Programmers who use spaces 'paid more' Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2017-06-18 20:22 -0400
        Re: [BBC] Programmers who use spaces 'paid more' "J. Clarke" <j.clarke.873638@gmail.com> - 2017-06-18 22:20 -0400
      Re: [BBC] Programmers who use spaces 'paid more' "Pascal J. Bourguignon" <pjb@informatimago.com> - 2017-06-19 07:50 +0200
        Re: [BBC] Programmers who use spaces 'paid more' Ike Naar <ike@iceland.freeshell.org> - 2017-06-19 07:24 +0000
        Re: [BBC] Programmers who use spaces 'paid more' Ike Naar <ike@iceland.freeshell.org> - 2017-06-19 08:28 +0000
        Re: [BBC] Programmers who use spaces 'paid more' "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-19 22:28 +0800
      Re: [BBC] Programmers who use spaces 'paid more' Snit <usenet@gallopinginsanity.com> - 2017-06-19 20:00 -0700
    Re: [BBC] Programmers who use spaces 'paid more' "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-19 18:46 +0800
  Re: [BBC] Programmers who use spaces 'paid more' "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-06-18 18:19 -0700
    Re: [BBC] Programmers who use spaces 'paid more' "J. Clarke" <j.clarke.873638@gmail.com> - 2017-06-18 22:23 -0400
      Re: [BBC] Programmers who use spaces 'paid more' "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-06-19 12:42 -0700
        Re: [BBC] Programmers who use spaces 'paid more' "J. Clarke" <j.clarke.873638@gmail.com> - 2017-06-19 22:19 -0400
          Re: [BBC] Programmers who use spaces 'paid more' "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-06-20 11:44 -0700
    Re: [BBC] Programmers who use spaces 'paid more' "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-19 18:47 +0800
      Re: [BBC] Programmers who use spaces 'paid more' nospam@please.invalid (AnthonyL) - 2017-06-19 11:24 +0000
        Re: [BBC] Programmers who use spaces 'paid more' "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-19 20:26 +0800
  Re: [BBC] Programmers who use spaces 'paid more' JJ <jj4public@vfemail.net> - 2017-06-19 20:53 +0700
    Re: [BBC] Programmers who use spaces 'paid more' Julio Di Egidio <julio@diegidio.name> - 2017-06-19 07:11 -0700
    Re: [BBC] Programmers who use spaces 'paid more' "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-19 22:27 +0800
    Re: [BBC] Programmers who use spaces 'paid more' Anton Shepelev <anton.txt@gmail.com> - 2017-06-21 00:51 +0300
      Re: [BBC] Programmers who use spaces 'paid more' Julio Di Egidio <julio@diegidio.name> - 2017-06-20 14:56 -0700
  Re: [BBC] Programmers who use spaces 'paid more' Simon Wright <simon@pushface.org> - 2017-06-21 13:27 +0100
    Re: [BBC] Programmers who use spaces 'paid more' Julio Di Egidio <julio@diegidio.name> - 2017-06-21 05:36 -0700
  Re: [BBC] Programmers who use spaces 'paid more' "Pascal J. Bourguignon" <pjb@informatimago.com> - 2017-06-21 18:48 +0200
    Re: [BBC] Programmers who use spaces 'paid more' "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-22 00:52 +0800
    Re: [BBC] Programmers who use spaces 'paid more' Adam Jensen <hanzer@riseup.net> - 2017-07-05 18:36 +0000

csiph-web