[fpc-pascal] Scoped enums and inferred types

Michael Van Canneyt michael at freepascal.org
Wed Feb 21 11:18:57 CET 2018



On Wed, 21 Feb 2018, Sven Barth via fpc-pascal wrote:

> Am 21.02.2018 09:48 schrieb "Ryan Joseph" <ryan at thealchemistguild.com>:
>
>
>
>> On Feb 21, 2018, at 2:57 PM, Michael Van Canneyt <michael at freepascal.org>
> wrote:
>>
>> The job of the compiler is to create correct code. Not to ensure you
> write readable code. Every feature that is introduced
>> offers more scope for abuse (generics jump to mind).
>
> I think you may change your mind if you had to type
> NSSomeLongNameOfSomethingValueKey all day instead of .Value. Remembering
> prefix names is a waste of my time if the compiler can do it for me. 
> I wonder how many hours total in my life I’ve spent writing lists of
> constants with prefixes and then typing them back out in function calls.
>
>
> I simply rely on my IDE (Lazarus, Visual Studio)  to complete long
> identifier names for me so that I don't have to. *shrugs*

My point exactly. Not the job of the compiler.

Michael.


More information about the fpc-pascal mailing list