[fpc-devel] Pascal to Java compiler

Alexander Klenin klenin at gmail.com
Tue Dec 2 12:30:03 CET 2008


On Tue, Dec 2, 2008 at 21:04, Felipe Monteiro de Carvalho
<felipemonteiro.carvalho at gmail.com> wrote:

> What does STL offer that the FPC RTL/FCL doesn't?

Primarily a well-developed collection of algorithms and data structures
suitable for natural and efficient integration into application programs.
The last part is especially important -- it is easy to write yet
another quick sort
or balanced tree. It is hard to design it in such a way that, to
application programmers,
using standard implementation is preferable to rolling their own.

Note that STL has its shortcomings too. For example, I believe that
Pascal's implementations dynamic arrays and strings
are easier to use than std::vector and std::string.
(But, unfortunately, unfinished, which leads to ugliness such as TList
and friends).

> I think it should be easy for someone who needs more classes or
> routines to implement whatever is missing.
Yes, implementation is indeed easy. The design is the hard part.
I have some thoughts on the design -- but it needs much work.

>We even have generics now.
Yes, and it seems there was even an attempt to use it in RTL.
Generics are still "unofficial", underdocumented and only
partially implemented, so I believe current functionality is not enough yet
to create anything competitive with the STL.

-- 
Alexander S. Klenin
Insight Experts Ltd.



More information about the fpc-devel mailing list