Noah Silva on Thu, 4 Jul 2002 00:17:22 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

RE: [PLUG] Pascal?


On Wed, 2002-07-03 at 23:12, Charles Stack wrote:
> Having been a Delphi (ala Object Pascal) developer for Windows since
> Delphi's introduction, I appreciate the ability to essentially "recompile"
> many Delphi applications to run under Linux.  As a general rule, I have
> found there is little that I can't do with Delphi (with the exception of
> device drivers, maybe).  The single inheritance model is fine when one

Well one thing I _don't_ like about Delphi and Kylix is their
over-pushing of oop and similar things.  It is used mainly by business
developers, not by "pure" programmers, so they don't know what good vs.
bad uses are.  You can write device drivers with most pascal dialects,
in fact, turbo pascal for dos was used to make many graphics demos
(mainly because of the ability to declare ASM procedures in the middle
of pascal).  For example, in "standard" pascal, the "close" identifier
is a function that closes a file handle.  In delphi or kylix, you need
to say "system.close" to specify that you mean the close in the system
unit, rather than something like "application.close" or "window.close"
(and application is dereferenced by default) if you are building a GUI
app.  All of the standard "old school" functions are still present
though, with the exception of the CRT unit, which is available from
third parties.  People can write bad code in ANY language.  For example,
I saw in a _book_ on how to program in Delphi, and example of how to
read files.  How?  Put a DirectoryList component (A GUI Object!) on a
form, and then make it invisible.  Then use DirectoryList1.strings[x] to
get at the file names.  This is the most absurd thing I have ever
heard...  When they could use the normal method of FindFirst ..
FindNext... FindClose.  The good thing about Delphi is that it brings
pascal to the masses.  Unfortunately, that's the bad thing about it too!

> considers that the concept of "interfaces" has been extended to not require
> COM to function.  Through implementing "interfaces", once achieves much of
> what multiple inheritence provides.  And, its available in Kylix as well.  

And FreePascal and...

> used to be an avid C++ developer.  But, have found that Delphi/Object Pascal
> meet 98% of my needs.
 
> I do a lot of communications work using sockets.  This is where Kylix fails
> (in my book).  The socket library (DxSock) I use relies very heavily on
> threading.  Kylix 1 (and I suspect 2), still haven't gotten pthreads down
> solid.  DxSock was to be included in Kylix.  The developer, however, refused
> to allow it to because the thread problems would make his code look like
> crap. On the Windows platform, his code easily outperforms all other socket
> libraries.  And, his webserver has achieved  higher throughput than
> Microsofts IIS.  Yes, the library uses blocking sockets rather than the
> event driven model.  He's in the process of rewriting the threading layer
> properly to bring his library to Kylix.  Borland, in their typical fashion,
> included an Open Source library, INDY, with Kylix.  This library certainly
> was not ready for production due to the same problems (and more).

I have not used DxSock, or even heard of it.  Indy works very well in
windows.  I think blocking sockets are the way to go.  The reason older
windows programs didn't use blocking sockets was that since there were
no threads, to block meant to block your whole program, not just one
thread.  (You can read the INDY Author's rant about this).  Of course
you can always just use the /dev/ devices for socket I/O in kylix, or
write your own library (as I did).  Casual users of Delphi don't realize
that Delphi's resemblance to VB is only very superficial.  VB basically
is a scripting language for DLLs written in C or another compiled
language.  All of the Delphi libraries and components, and even the GUI
builder system were written IN Delphi, and thus are modifiable and
inheritable.

> 
> But, Kylix 3 is not being targetted at writing servers, per se.  Instead, it

I don't care what they target it at, it's still pascal with a nice
debugger, GUI, and some included libraries.  Delphi 1 was "targeted" at
GUI apps and Database apps... Delphi 2 was targeted at something else...
Delphi 5 was about web services, Delphi 6 is about cross-platform...
whatever.. the main thing that's changes is the included libraries, and
since you can write these libraries yourself...  It's not to say Delphi
hasn't improved over the years, but what's important to me is the sore
technology.  If you just like it for the GUI builder, VB is just as
easy.  If you like it because it makes fast code and has lots of
libraries, then C has it beat in number of libraries by far.  I like it
because the underlying language is flexible enough to do many things,
and do most of them better than C, and it's actually readable.

> being touted as a way to create Web Services with improved support for SOAP
> and database access.  In these areas, it seems to perform quite well.
> Unfortunately, K3 is not yet released and I'm left having to work with K2
> for a little while longer.  The need to use CLX over the VCL to obtain cross
> platform support is also detrimental as not all 3rd party vendors are
> offering CLX support (but, that changes weekly).

I normally write my own components or customize Open Source ones. (or
inherit the closed-source ones and add functionality).

 
> Tools such as Kylix and JBuilder (and whatever the C++Builder version for
> Linux is called) are the key to bringing more "business" oriented apps to
> Linux.
> And, in doing so, it will mean a migration from Windows to
> alternative OSes such as Linux. 

I agree, but some in the Linux universe will resist this as others
embrace it.

 Microsoft seems to be helping us along
> these days by changing the way they want to do business.  The gut reaction
> of many IT shops is to begin searching for alternatives.  The OS with the
> largest selection of business and developer tools will win.  This means
> Linux is poised to become more than a blip on the IT radar screen.

I don't think most linux developers get this.  The linux developers
tools I have seen are rudimentary at best.  Coding a program with vi in
one window and gcc in another X-term and glade running and gdb on
another console is hardly efficient compared to a decent IDE like kylix
has.  The problem is the "debuggers are for wimps" attitude.  Well tell
you what, I'll race someone using the above method to make almost any
simple app. ;)
 
> Kyle Burton demonstrated to me how Linux could be useful in a business
> environment several years ago.  I now run it exclusively for my internet
> servers.  My systems don't crash (I don't remember when I had to reboot the
> web server last).  And, I'm now making headway to move some of our core
> products to the Linux platform.  When we succeed, we have the ability to
> "black box" our systems.  This is possible because one does not need to
> write a visual application using Kylix.  It's still possible to write
> "console" apps or even daemons.  

Yes of course, I wouldn't even use it if it wasn't.  Though for Console
apps, I debug them in kylix, and then make sure they work at least in
Delphi, FreePascal, and Virtual Pascal. (which they usually do with no
changes).  This way if I distribute it, anyone can download FreePascal
or Virtual pascal and play with it without having to register for or pay
for Kylix if they don't want to.

> But, we all seem to concentrate on the GUI
> aspects.  But, since the compiler (and libs) are not GCC compatible, many of
> the tools and libraries we depend upon are not currently available to us.

Well of course the compiler isn't GCC compatible, but you can produce
and use .so files, so I am not sure what you mean.  If you have seen GNU
Pascal compiler.... be very very afraid and run.  It is the biggest
piece of sh-t I have ever seen... if people have used that... no wonder
they hate pascal, I would too.  It says things like "what's a unit?",
and then claims to be turbo compatible.  whatever they were smoking, it
must be good stuff.

The only reason I don't make a lot MORE stuff in pascal is that there is
no target for any decent pascal compiler that I know of for Sparc/Linux.
(Maybe codewarrior has it, but note I said decent..)

> Kylix is not intended to be a mere Delphi clone for Linux.  C++Builder is
> also being ported.  And, the JBuilder product was the first to make the
> port.  JBuilder has won many awards.  

Jbuilder itself is done in Java from what I understand, so it didn't
have to be ported, and Borland C compiler is already out for Linux, just
not the IDE for it.  I think that people who want to use C will continue
to use GCC, even if it isn't better, just because it's defacto.

> But, word on the street is that the
> products are not selling as well as expected.  The end result is that these
> tools may be pulled and all effort concentrated on .Net technologies.
> Borland may have shot themselves in the foot early on by screwing up the
> license.  Who knows for sure?

I don't love the license either.  I would like to use Kylix OE to make
BSD or SISSL licensed products, but I understand their reasons.  I don't
know if I expected them to sell well or not.  I think they will sell
better when more big companies that use Delphi now start using linux. 
at any rate, selling well or not, whatever the license, it's still very
cool technology.  If they concentrate on .net, microsoft will beat them
at their own game though, I would bet on that.
 
> The misconceptions that many have regarding Pascal (and Object Pascal) are
> just that; misconceptions.  I can debate for hours on the subject.  But,
> until we can mix and match libs between GCC and Kylix environments and the
> price of the real Kylix tools (not the Open Source one) drops substantially
> (how many personal developers can affort a $2K price tag) the crowd will
> favor GCC.  And, I can't totally blame them.

Well the "real" Kylix and the "enterprise" kylix only differ in included
components, which, form and end user point of view is important, but
from a more hardcore programmer point of view is irrelevant.  Given a
little time, I could code almost all of the components they include in
professional, and release them as GPL.  You could then download Kylix OE
and download my components, and voilla!  I already did this to make some
older pascals compatible with Delphi's non-GUI stuff.  f.e. the
"SysUtils" unit didn't exist back in the turbo 7 days, but it is nice. 
Since it's standardized now, I made a lib that will compile in turbo and
implement all of the SysUtils that is feasible with the features in the
Turbo 7 compiler.  There is no reason this can't be done for GUI
components as well.  I am not saying borland would like me much for it. 
This is also being done for FreePascal as we speak.  They are working on
a GUI builder project very <cough> similar to Delphi/Kylix.  It goes
slowly, but it makes progress, and it's open source, so it won't
disappear like Sibyl did.

 -- noah silva
 
> Charles
> 
> -----Original Message-----
> From: plug-admin@lists.phillylinux.org
> [mailto:plug-admin@lists.phillylinux.org]On Behalf Of Noah Silva
> Sent: Wednesday, July 03, 2002 10:37 PM
> To: plug list
> Subject: [PLUG] Pascal?
> 
> 
> Hi,
> 
> >From the response I saw at the meeting, I assume the two or three people
> that asked me about Kylix were the only people who were interested.
> 
> Since I heard the groans around the room, I have to ask: Why?
> It has been my experience that many techie types (or hardcore C or ASM)
> are prejudiced against pascal just as much as Basic, but usually with no
> basis, or a very outdated basis.  There seems to be a lot of
> misconceptions floating around pascal (it's slow, it's not powerful,
> it's interpreted...), and I have to wonder why?
> 
> Also I should point out that there is no other tool which even comes
> close to being able to build and debug GUI applications on linux as
> conveniently as Kylix.
> 
> I'm not trying to start a flame war, but I am interested on opinions
> about this.  I have programmed in Pascal and C (and modula and rpn, 68k
> asm, etc.) for many years, including designing some compilers in
> college, and so far, pascal is still my favorite ;)
> 
>  thanks,
>      noah silva
> 
> 
> ______________________________________________________________________
> Philadelphia Linux Users Group       -      http://www.phillylinux.org
> Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
> General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug
> 
> 
> ______________________________________________________________________
> Philadelphia Linux Users Group       -      http://www.phillylinux.org
> Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
> General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug
> 



______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug