[fpc-pascal] Re: Feature proposal: function-based assignment operatorst
Mark Morgan Lloyd
markMLl.fpc-pascal at telemetry.co.uk
Sat Mar 30 11:23:47 CET 2013
Jürgen Hestermann wrote:
> Am 2013-03-29 11:20, schrieb Mark Morgan Lloyd:
>> What is it about Pascal programmers and their assumption that
>> verbosity is a prerequisite to clarity?
>
> Why do you think nobody is writing text in stenography? It would be much
> less text to write. But we use "standard" languages which have a lot of
> redundancy. This has the advantage that errors can easily be detected
> and often can also be corrected. With no redundancy this is not
> possible. The same applies to programming languages. And that makes
> (made) Pascal much clearer than C.
So how is something like the += idiom, which seems to be unpopular
because it's "not Pascal", unclear? Or for that matter how can braces as
distinct from Pascal-style begin-end make a language inferior when their
use is unambiguous?
The biggest threat to clarity comes from excessive overloading: use of
[] for array subscripts and set elements, use of () for statement
grouping, function parameters and so on, multiple function definitions
distinguished by their parameters, class/type helpers, and in particular
automatic type conversions. Not that I'm suggesting that any of these be
ripped out of the language, but my own belief is that notational
shortcuts such as += cannot be criticised on the grounds that they
sacrifice clarity or compromise error handling.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the fpc-pascal
mailing list