Article View: comp.lang.pascal.delphi.misc
Article #230Re: Delphi equivalent in the C world or Scheme/LISP world
From: Hans-Peter Diettrich
Date: Thu, 21 Aug 2008 10:38
Date: Thu, 21 Aug 2008 10:38
94 lines
5655 bytes
5655 bytes
gnuist006@gmail.com schrieb: > This was a nice reply where you tried to explain some special aspects > of delphi > based on the techniques of compiling and cross compiling them. > Therefore I have > confidence that this explanation can be expanded a little and made > more lucid > for a newbie like me by putting in more details into a single self- > contained > account. So much more could be said, depending on what exactly you want to do. >> Most GUI development environments are based on specific graphics >> libraries. TheDelphiVCL (Visual Component Library) was developed for >> Windows GDI, then converted into CLX (AFAIR based on Qt), and FreePascal >> has implemented a true platform independent FCL (Free Component >> Library), that is fully compatible with the VCL. The whole VCL/FCL is >> written inDelphi(OPL), so that it can be used only with compilers that >> can use theDelphiobject model. The RAD Studio, now sold by >> Embarcadero, includes such compilers forDelphi,Delphi.NET, C++ and C#, >> where for C# the VCL has been ported to .NET, so that it also can be >> used with every .NET language. > > I am surprised that C/C++/C# people and gnu people have not done this > since even > unix and X windows are written in these languages and also the > microsoft > windows. Most companies and GNU groups concentrate on their own goals, and do not cooperate much with each other. The .NET approach lacks compatibility with existing code and languages, and the users have to follow every change in the proprietary Microsoft libraries. The GNU activities traditionally solve portability problems by adding tools, like automake, that introduce new problems, which have to be fixed by even more tools. When I asked them for cooperation in the design and implementation of a new model, for managing and building platform independent libraries and programs, the only answer was "make it work yourself, then we'll see...". The consequence is, that more and more people use interpreted languages in the POSIX world, where only the interpreter has to be ported once to every platform. >> but since >> I came acrossDelphi, now I write everything inDelphimyself, and only >> "package" existing C code for use in myDelphicode. > > How do you call or package C code inside delphi ? Delphi has a package concept, similar to the .NET assemblies, that allows to make and use packages regardless of programming languages. Well, not really *all* languages, but all those that can use external binary libraries (*.DLL, *.so). Thus making a package is not very different from making a DLL. And like in making an ActiveX DLL, you have to #include the according header files in your C code, to make sure that the package itself, and all users of that package, will use the very same type definitions and runtime library. Of course C and Delphi have different opinions, about how a "header" file should look like. Therefore tools exist to convert C header files from or into Delphi interface units, which may be invoked automatically in a newer IDE. Note that IDE stands for Integrated Development Environment, which integrates compilers for multiple languages, and knows how to make accessible modules of one language in the other languages :-) > What is the best book to read for a newbie on delphi and what is the > software needed to practice as you read ? This would help me a lot > since > i have to learn by myself. I cannot suggest any current literature, because I had to buy my last book many years ago. > I also dont know if any schools in the US > teach programming via delphi. All I ever heard was scheme and python > these days. As mentioned above, only few languages are so platform independent that they can be used in teaching programming in general. As a Windows user, you may not have noticed that you'll have to tweak your C code for use on every other platform. Teaching C effectively means teaching "how to use C on platform XYZ", and that's why platform independent languages are preferred in education. Even if Delphi currently is bound to Windows, I've emphasized the easy use of Delphi code on many other platforms, by simply using the FreePascal compiler. Did you know that FPC can cross-compile your Windows programs even for exotic machines, like ole Amiga or Atari? DoDi
Technical Details
Message-ID:
<6h5f80Fj2cneU1@mid.individual.net>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<15735381-ff5d-42d9-ab98-50b79ef4774b@a3g2000prm.googlegroups.com> <6h396lFig2knU1@mid.individual.net> <d3fda61c-a4c1-449e-ba39-dc2025cfe8eb@r66g2000hsg.googlegroups.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10baee,e51978c8aaf77a0a X-Google-Thread: 11ae7b,e51978c8aaf77a0a X-Google-Thread: 109fba,e51978c8aaf77a0a X-Google-Attributes: gid10baee,gid11ae7b,gid109fba,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Hans-Peter Diettrich <DrDiettrich1@aol.com> Newsgroups: comp.lang.pascal.delphi.misc,borland.public.delphi.language.delphi.general,comp.lang.c++ Subject: Re: Delphi equivalent in the C world or Scheme/LISP world Date: Thu, 21 Aug 2008 12:38:04 +0200 Lines: 94 Message-ID: <6h5f80Fj2cneU1@mid.individual.net> References: <15735381-ff5d-42d9-ab98-50b79ef4774b@a3g2000prm.googlegroups.com> <6h396lFig2knU1@mid.individual.net> <d3fda61c-a4c1-449e-ba39-dc2025cfe8eb@r66g2000hsg.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net /QarQyfDnrvX0nnVqZ+pcwmuFydMDjWGZmKnciaItjRbKq/B4o Cancel-Lock: sha1:Ck6InvOLpnDD3JWS2rY+DL50QYc= User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <d3fda61c-a4c1-449e-ba39-dc2025cfe8eb@r66g2000hsg.googlegroups.com>