Zitat von Al Boldi <[EMAIL PROTECTED]>:

> Michael Van Canneyt wrote:
> > On Mon, 23 Jul 2007, Al Boldi wrote:
> > > Graeme Geldenhuys wrote:
> > > > So again, what is the pros and cons between the two design choices
> > > > when using the Object Pascal language?
> > >
> > > .dfm is good for beginners, who get confused looking at code they didn't
> > > write.
> > >
> > > .pas is good for pros, who need to take control of their project code.
> >
> > Obviously you are unaware of the real reasons the .dfm mechanism was used,
> > otherwise you would not use such unappropriate demeaning tone.
>
> No offense meant.  The .lfm is probably there for compatibility reasons.

Well, using a similar system like Delphi makes porting easier. But it is not
there for 'Delphi compatibility'. The .lfm is used because:
- a separate file is independent of syntax errors in the source code
- the file format should be easy to read/stream

The lfm reader/writer was at hand at the time. Nowadays we could use the xml
reader/writer too, although that is less human readable.
Using pascal source as file format would be possible and has some advantages but
some disadvantages as well.


> > There are/were good reasons for it's use. These reasons may have been
> > outdated, but at the time, they were certainly valid. It was (and is,
> > in my opinion) a defendable choice. I have not seen you give any valid
> > and objective reasons why code is better than resources. Unless you
> > plan to give such reasons, I suggest you abstain from such demeaning
> > comments.
>
> This really has nothing to do with resources.  Resources should still be
> saved in its own .res file.
>
> This is about code init, and as such should not be mutilated into some
> obscure hardcoded "code init" translator, but instead be obviously exposed
> for code control.

Well, it is exposed, because it is a simple text file. And you can edit it in
the IDE (just make sure to close the designed form, while doing so).
If we would switch the lfm file format to a more pascal like dialect you will
not get more code control, because the parser will not understand your
extensions.


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to