[fpc-devel] Need advice for refactoring
Alexander Klenin
klenin at gmail.com
Sat Jul 17 11:02:47 CEST 2010
On Sat, Jul 17, 2010 at 11:36, Hans-Peter Diettrich
<DrDiettrich1 at aol.com> wrote:
> In the first step I'll enclose all semantical code into begin-end,
> so that it can be easily hidden (folded) in the Lazarus IDE.
This is not needed -- you can use {$REGION} ... {$ENDREGION}
directives instead.
If/when somebody implements http://bugs.freepascal.org/view.php?id=13974,
you will be even able to auto-fold irrelevant parts automatically.
>Later these blocks shall be extended into
>
> if cond then
> new_proc
> else
> begin
> [old code, also copied into new_proc()]
> end;
Hm, did you consider a proper object-oriented implementation?
I know it is not easy, but since you are going for a great refactoring anyway...
> For first results see the dodi/parser_rewrite branch.
Generally speaking, long-lived feature branches should be avoided in SVN,
since the merging is incredibly painful. So it would be advisable to merge
back as soon as possible, or even just work on trunk, using
the techniques you mentioned above to avoid breakage.
--
Alexander S. Klenin
More information about the fpc-devel
mailing list