[fpc-devel] Fwd: While - Otherwise Statement

Mark Morgan Lloyd markMLl.fpc-devel at telemetry.co.uk
Wed Oct 14 10:06:18 CEST 2015


Michael Van Canneyt wrote:

>> But the existence of such a continue block shows the fundamental issue 
>> on which a decision is needed. should (if a volunteer for a patch 
>> exists) every little "save one statement in your code helper" be 
>> added? Because there are thousands of them, and if you add them all 
>> the readability of code will go down, because you need to first learn 
>> them all.
> 
> I think the answer to your question is a clear and loud "NO".
> 
> The argument that we can refrain from using these new features does not 
> hold,
> because other people will be using it, and we will have to know all of 
> it to be able to understand their code.
> None of these features will automagically make Object Pascal a popular 
> language.
> 
> However, I seem to be one of the very few thinking this given the 
> enthousiasm with which people are discussing this.

For what it's worth, I agree with you. It's one thing restoring 
something like the "inline if" (or a functional equivalent) which was in 
ALGOL and is regularly used in most current languages, but doing 
something like adding a completely new flow control construct which has 
no significant precedent in other languages is much more difficult to 
defend.

> Soon I will be forced to emigrate to Javascript country. Despite all its 
> drawbacks, it remains at least a simple language. a dozen keywords and 
> you're done. No wonder Node.js is so popular.
> Compare that with the jungle we're making of it... :(

At the same time, I think it's worth distinguishing three distinct cases 
that contribute to syntax complexity.

The first is the case that you had in early ALGOL implementations, where 
there was limited support for external libraries and where every detail 
of control of- for example- file open mode had to be expressed as part 
of the language syntax.

The second is the case where a language has a fairly verbose syntax, but 
where this is used to define a rich set of general-purpose flow-control 
and data-definition constructs. This is where Pascal is at.

The third case is modern C++, Javascript and so on which grossly 
overload the limited ASCII character set and where abusing even the 
lowly parenthesis can have non-obvious effects. Then there's the issues 
they have with things like "static", and their use of "std::something" 
as quasi-directives.

I'm still struggling with a mainframe emulator, originally written in 
Javascript, where around half of the complexity was due to the lack of 
any support for multithreading. I also think that the recent forking of 
the Scratch graphical language, where a significant proportion of the 
community has rejected MIT's attempts to reimplement it in Javascript, 
indicates that there's an increasing awareness that both the language 
and its typical implementations- i.e. embedded in a browser or as 
ActionScript in Flash- leave much to be desired.

And Node.js is lipstick on a pig.

-- 
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-devel mailing list