<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 25, 2016 at 3:08 PM, Michael Van Canneyt <span dir="ltr"><<a href="mailto:michael@freepascal.org" target="_blank">michael@freepascal.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
On Mon, 25 Jan 2016, silvioprog wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Many units in Free Pascal and Delphi uses C libraries... when aren't using<br>
a C library (an API system call, an third party library call, etc.), are<br>
using assembly, ie, mostly time Pascal is used as a high-level language to<br>
consume some low-level code written in C or assembly.<br>
</blockquote>
<br></span>
There is a simple reason: Debugging and bugfixing is a lot easier if all the code is in pascal.<br></blockquote></div><br>Here's another reason - cross-platform availability.<br></div><div class="gmail_extra">FPC is cross platform. To some extent (Java?) is more cross-platform that C is.<br><br></div><div class="gmail_extra">When using an external library, there might be a risk that the library is not *easily* available for another platform that is targeted. It's common for open-source projects, not to provide any binary builds, requiring a library user to build the library themselves. Luckily, the most common projects do have some satellite projects that actually provide binaries.<br><br></div><div class="gmail_extra">Building C (C++) library could be a real pain for some Pascal users. (Pascal spoils!)<br></div><div class="gmail_extra">Building C/C++ library for a desired target platform, could be even more painful, specifically if some sort of cross-tools required or when building configuration needs to be changed.<br><br></div><div class="gmail_extra">Thus a pure pascal library would be a number one choice for most users. With though it might be outdated and/or slower than its C-counterpart (i.e. paszlib vs zlib)<br></div><div class="gmail_extra"></div><div class="gmail_extra"><br></div><div class="gmail_extra">thanks,<br></div><div class="gmail_extra">Dmitry<br><br></div></div>