[Lazarus] Lazarus 0.9.28.2 released

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Nov 4 11:26:12 CET 2009


2009/11/4 Hans-Peter Diettrich <DrDiettrich1 at aol.com>:
>
> Source code formatting is a matter of taste. Regardless of the internal
> storage of horizontal formatting, the result does not please everybody.

Yes I know that, but elastic tabstops is so far the best formatting
option I could find. And I would definitely us it for my own projects
- if it existed in Lazarus.

Also, as I mentioned, the gEdit plugin that enables elastic tabstops
has a option to automatically do conversions. So you can work with
elastic tabstops enabled, but when saved, the file gets converted back
to using spaces.

Also elastic tabstops touch on a point that most formatting arguments
(tabs vs spaces) do not pick up on. Formatting MUST be done by the
Editor in a visual only way - same as what editors visually do Code
Folding, or drawing Procedure Divider lines. Code Folding markers or
Procedure Divider lines are not something in your actual code content.
This "eye candy" is applied over your code and *not* in the source
code itself.

Same thing should apply to code formatting, which is what Elastic
Tabstops does. You press the Tab key, which inserts the char $09 -
nothing more! Now the editor does the formatting for you, but doesn't
modify the source code contents to do it.


> I'd appreciate a version control system that separates formatting from
> content, and thus would track only changes in the content, regardless of
> whitespace and line breaks.

Then switch to Git. It has had this option since the beginning of Git
(a few years back).


> essential changes. Furthermore the *language* should allow for automatic
> formatting, and the OPL has certain deficiencies in this area.

Rubbish, you just said formatting is a personal thing! Plus the
compiler doesn't give a crap what formatting you use, as long as the
code syntax is valid. This is exactly how it should work. Formatting
is definitely NOT a language feature.


> If somebody wants to have formatted tables, he'll have to insert formatting
> *instructions*, so that the layout can be restored later - but where should
> such instructions be stored?

This has been done for years in C programming. Have you not noticed
the first line in many C source code files, it specifies the tab width
in a commented line.

But that is also not ideal, because now you are forcing YOUR
formatting onto other people that open that file. Again, Elastic
tabstops solves the problem nicely, because you personally define the
formatting of a Tab character ($09) in your editor - *without* needing
to modify the source code to get formatting correctly.

If you are still confused as to what Elastic Tabstops do, then re-read
my earlier post that explains it. Each line in that example only uses
two Tab characters, but based on your customizations of elastic
tabstop settings, the formatting will be different between users, but
still align correctly for everybody. That applies even if you use a
variable width font too! So you are no more limited to only coding
with monospace type fonts.

-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/




More information about the Lazarus mailing list