[fpc-devel] Pascal Standard, and what we can do.

Michael Van Canneyt michael at freepascal.org
Thu Jul 23 09:21:57 CEST 2015



On Wed, 22 Jul 2015, Maciej Izak wrote:

> 2015-07-22 19:47 GMT+02:00 Sven Barth <pascaldragon at googlemail.com>:
>
>> While I agree that type inference /might/ be useful I don't agree with
>> inline variable declarations. One of the main points of Pascal is declare
>> before use. While this is somewhat violated with Delphi compatible generics
>> there one could at least argue that the specialized type is implicitly
>> declared by the generic declaration...
>>
>> Regards,
>> Sven
>>
> Sorry Sven but I do agree with inline variable declarations. You don't have
> exclusive rights to dictate what is main point of Pascal (there is also
> Oxygene, SmartPascal). This is your opinion and this is not ultimate truth.

Oxygene is no longer pascal. It's just C# with pascal keywords. a pityful copy.
If you want the features of C#, you should use C#, full stop.

Regarding inline declarations:
Pascal is about bringing clear structure in your code. Plan first, code then.
>From this point of view there is no need for inline variable declarations.

Also, the location of variables is entirely irrelevant with an IDE like Lazarus.
Press ctrl-c on a variable and Lazarus inserts it in the correct location, 
*as required by the language*. It is exactly because the Pascal language is so 
structured that Lazarus *can* do it.

So: People who think they *need* inline variable declarations need in the first 
place to use another language than pascal or use a better IDE.

Given that other languages have inline variable declarations since more than 30 years,
the statement that having inline variable declarations makes a language "more modern"
is pure nonsense.

It is just a wish of people who think that 'anything goes', it has nothing to do with 
being more productive or being modern.

The 'anything goes' dictum may be nice in modern arts (also often a load of male cow droppings)
but has IMO no place in computer programming, where structure is central.

Why do you think Google, MS and some others are trying to add structure to a language like Javascript ?
exactly so they can do things in a JS IDE like Lazarus already does. As JS is now, they simply cannot, 
because the language has no structure.

But then, all that is just my truth. Yours may be entirely different.

Michael.



More information about the fpc-devel mailing list