[fpc-devel] Re: [fpc-l] type discussion

Jamie McCracken jamie-junk at blueyonder.co.uk
Fri Jun 3 12:47:38 CEST 2005


Marc Weustink wrote:
> Jamie McCracken wrote:
> 
> [snip]
> 
> 
>>would become under Rad Pascal:
>>
>>uses
>>  Classes, SysUtils;
>>
>> TMyObject = class (Tobject)
>>    private
>>        count : integer;
>>    public
>>        constructor create; override;
>>	    inherited Create(AnOwner);
>>	    inc (count);
>>
>>        destructor destroy; override;
>>	    inherited Destroy;
>>
>>
>>Notice its at least 50% less code to write.
> 
> 
> Hmm.... less to write... and maintain ?
> 
> Go for example to the lazarus project and try to write the controls.pp
> unit  this way. Do you still think it is a good idea ? When all code is
> put in the class header itself, can you still tell what methods a class
> has ?

not a problem for an IDE - it can extract the methods and in fact visual 
studio does that for c#. And likewise with the code explorer in lazarus.

> 
> Besides, when we are at Lazarus (or Delphi), when you have typed
> 
>   TMyObject = class (Tobject)
>      private
>        count : integer;
>      public
>        constructor create; override;
>        destructor destroy; override;
>   end;
> 
> and press ctrl+shift+c it will generate the whole body. Which is already
> less typing :)
> 
> You have to type even less if you start with
> 
>   classf
> 
> and then press ctrl+j
> 
> So what is the point to make the language less clear, while there tools
> exist which do most of the annoying typing for you ?


It makes it more clear IMO not less. having all that interface code and 
having to jump between it and the implementation does not aid 
legibility. Having it all nicely tied up in my proposed Rad Pascal, C# 
and python does.

Those lazarus tools are great but they require advance knowledge of 
those tools that new users wont have (at least somebody using lazarus 
for the first time is not going to know all the keyboard shortcuts). Not 
having to rely on hacks around the coding inefficiency of a language 
with keyboard shortcuts is always a plus in my book too.

At the end of the day, if you dont like my new dialect then dont use it 
- stick to {$mode objfpc} in your code. I want to offer you a new 
dialect that should hopefully make your life easier but if it does not 
then fair enough.

jamie.




More information about the fpc-devel mailing list