New Delphi fanboy - Seeking some guidance

EricMartello

Senior member
Apr 17, 2003
910
0
0
I may be jumping the gun but I like to think I'm pretty good at discovering old things and presenting them as if they were the best thing since slice bread even though they've been under my nose all along. Some of you may know that my programming mentality is more "old school". I am opposed to the bloat and inefficiencies with modern managed languages, as well as the lazy/unskilled programmers who think they're da bomb for making a VB.n00b crapplication.

Call me unreasonable, but I'm not even a big fan of OOP - yes I'm so archaic that I think procedural programming is the way to go...and technically, C is faster than its OO cousin C++ (ASM is faster than either of those still...) but that's besides the point.

I'm here to proclaim my current love, Delphi. I originally wrote it off as a noob-wannabe-VBRipoff but now that I am older and slightly wiser, I've found a new appreciation for this language. For those of you who don't know, Delphi is like a user-friendly C++. The source code is very similar to Turbo Pascal. It is OO, but the main benefit of Delphi is the sheer speed at which you can create a windows app.

Not only is Delphi fast for development (concept to application), but the program execution speed is actually on par with C++, maybe faster in some cases. Wow! Better yet, your final app DOES NOT need a crapload of DLLs or runtimes to work - just the EXE file alone can be enough (unless you use .NET shite in your app). Hey, I'm sold! Glad I rediscovered Delphi. You can even download the IDE and Compiler free from Codegear (it's free for personal / non-commercial use).

I've already been able to make some pretty neat (albeit basic) applications that work well and now I'm going to raise the bar and tackle something bigger. I want to make a super-streamlined ESMTP server that I can run locally on my Windows servers. Why? Well, there really aren't any GOOD smtp servers for windows. You got Exchange...it sucks. You got xmail...meh...Imail is probably the best option for Windows but I wouldn't call it the "Exim of Windows"...it's not free first of all, and I think Exim has a much better community of support behind it. The unix-like options such as qmail are great for nix servers but not ideal windows solutions.

I learn by seeing and doing, and I like tutorials that SHOW me (i.e. more pictures less text) how to do things in Delphi. I don't want to try to decipher someone else's program just yet, I'm still familiarizing myself with the syntax and the structure of programs...can anyone point me toward some good tutorial websites which deal with socket-based programming? Alternatively, are there any small (read: basic) SMTP server sources that I can check out? All help is appreciated, and my ESMTP server may be free if I do complete it. :)
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
I'm here to proclaim my current love, Delphi. I originally wrote it off as a noob-wannabe-VBRipoff but now that I am older and slightly wiser, I've found a new appreciation for this language.

You must have been around awhile :). I did a mini-review on Delphi for DDJ in January of '95. VB came out when... 1991 I think. But there were other graphical application development environments out at the time. Powerbuilder, which came out the same year as VB, was pretty widely used right around the time Delphi came out. There was at least one graphical Smalltalk environment, and one or more for LisP.

Delphi interested me in 1995 for two reasons: 1) it was the successor in many ways to Turbo Pascal, which was hugely popular for a long time; and 2) it was the first graphical environment that both adopted OO principles and wove them into the way the tools worked. I reviewed it, found it neat, and moved on. Never used it again, but I know it built a pretty loyal Hypercard-like following. Borland C++ Builder took many of the concepts proven in Delphi and migrated them into a "serious" application dev. environment, but by then MS had started poaching all Borland's talent, and Visual C++ was about to dominate.

Can't resist a stab at your OO vs. procedural remark :). All abstractions cost us in terms of performance. The overhead of C++ vs. C in general programming is minimal enough to be irrelevant. The benefits of more complete and robust abstractions are well worth it.
 

EricMartello

Senior member
Apr 17, 2003
910
0
0
Originally posted by: Markbnj
I'm here to proclaim my current love, Delphi. I originally wrote it off as a noob-wannabe-VBRipoff but now that I am older and slightly wiser, I've found a new appreciation for this language.

You must have been around awhile :). I did a mini-review on Delphi for DDJ in January of '95. VB came out when... 1991 I think. But there were other graphical application development environments out at the time. Powerbuilder, which came out the same year as VB, was pretty widely used right around the time Delphi came out. There was at least one graphical Smalltalk environment, and one or more for LisP.

Delphi interested me in 1995 for two reasons: 1) it was the successor in many ways to Turbo Pascal, which was hugely popular for a long time; and 2) it was the first graphical environment that both adopted OO principles and wove them into the way the tools worked. I reviewed it, found it neat, and moved on. Never used it again, but I know it built a pretty loyal Hypercard-like following. Borland C++ Builder took many of the concepts proven in Delphi and migrated them into a "serious" application dev. environment, but by then MS had started poaching all Borland's talent, and Visual C++ was about to dominate.

Can't resist a stab at your OO vs. procedural remark :). All abstractions cost us in terms of performance. The overhead of C++ vs. C in general programming is minimal enough to be irrelevant. The benefits of more complete and robust abstractions are well worth it.

Actually I was using C++ Builder before VC++ and I've always found Borland's solutions to be more user-friendly or visual. I mean VC is by no means bad for someone who wants to code, but when it comes to VISUAL development I feel that Borland/Codegear has the edge. What really piqued my interest in Delphi most recently was the "hello world" app. With Delphi, you literally have 4 lines of code and you actually type just 1 of those 4 lines and bam, you have a fully functioning windows app. It does nothing, but proof of concept. In VC++ it would take over 100 lines to get that result and it's non-intuitive, meaning that if you don't have a background in C syntax you probably will not figure it out without some kind of reference....and not just that, those apps I made already took me less than a few days to whip together since I was able to get by on "common sense" with Delphi. THAT is like the deal-maker for me, the speed combined with simplicity...now I feel bad for ignoring it all these years but to be honest I probably wouldn't have appreciated it until now anyway (I tend to value my time more now than I did when I was in my teens).

As for your OO vs Proc rebuttal - can't really disagree. OO is great if you are someone is keeping tabs on the classes, the functions in said classes, the overall flow of the application, etc. But let's say that you don't have the luxury of being there from square one...trying to follow the flow of an OO program is very tricky, especially with larger apps. It has its benefits, no doubt...but for my mind following things in a straight line top to bottom tends to work better...and most CPUs will back me up on that one. :D
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Actually I was using C++ Builder before VC++ and I've always found Borland's solutions to be more user-friendly or visual. I mean VC is by no means bad for someone who wants to code, but when it comes to VISUAL development I feel that Borland/Codegear has the edge.

No doubt, C++ Builder was better for the UI creation stuff than VC++ was back in those days.

I can't remember if C++ Builder had a separate runtime that it required, but these days I cringe whenever I see a machine with BDE installed on it.
 

Cogman

Lifer
Sep 19, 2000
10,286
147
106
Originally posted by: EricMartello
I may be jumping the gun but I like to think I'm pretty good at discovering old things and presenting them as if they were the best thing since slice bread even though they've been under my nose all along. Some of you may know that my programming mentality is more "old school". I am opposed to the bloat and inefficiencies with modern managed languages, as well as the lazy/unskilled programmers who think they're da bomb for making a VB.n00b crapplication.

Call me unreasonable, but I'm not even a big fan of OOP - yes I'm so archaic that I think procedural programming is the way to go...and technically, C is faster than its OO cousin C++ (ASM is faster than either of those still...) but that's besides the point.

I'm here to proclaim my current love, Delphi. I originally wrote it off as a noob-wannabe-VBRipoff but now that I am older and slightly wiser, I've found a new appreciation for this language. For those of you who don't know, Delphi is like a user-friendly C++. The source code is very similar to Turbo Pascal. It is OO, but the main benefit of Delphi is the sheer speed at which you can create a windows app.

Not only is Delphi fast for development (concept to application), but the program execution speed is actually on par with C++, maybe faster in some cases. Wow! Better yet, your final app DOES NOT need a crapload of DLLs or runtimes to work - just the EXE file alone can be enough (unless you use .NET shite in your app). Hey, I'm sold! Glad I rediscovered Delphi. You can even download the IDE and Compiler free from Codegear (it's free for personal / non-commercial use).

I've already been able to make some pretty neat (albeit basic) applications that work well and now I'm going to raise the bar and tackle something bigger. I want to make a super-streamlined ESMTP server that I can run locally on my Windows servers. Why? Well, there really aren't any GOOD smtp servers for windows. You got Exchange...it sucks. You got xmail...meh...Imail is probably the best option for Windows but I wouldn't call it the "Exim of Windows"...it's not free first of all, and I think Exim has a much better community of support behind it. The unix-like options such as qmail are great for nix servers but not ideal windows solutions.

I learn by seeing and doing, and I like tutorials that SHOW me (i.e. more pictures less text) how to do things in Delphi. I don't want to try to decipher someone else's program just yet, I'm still familiarizing myself with the syntax and the structure of programs...can anyone point me toward some good tutorial websites which deal with socket-based programming? Alternatively, are there any small (read: basic) SMTP server sources that I can check out? All help is appreciated, and my ESMTP server may be free if I do complete it. :)

On the OOP statement. now-a-days, C++ programs will actually compile into faster code then C will. (dang it I can't find it now, there is a giant compiler comparison that proves this point). So if it is easier to make the program OO, why not? You're using a RAD tool anyways (not known for their code being speedy).
 

EricMartello

Senior member
Apr 17, 2003
910
0
0
Originally posted by: Nothinman
No doubt, C++ Builder was better for the UI creation stuff than VC++ was back in those days.

I can't remember if C++ Builder had a separate runtime that it required, but these days I cringe whenever I see a machine with BDE installed on it.

Pretty sure that it didn't need a runtime unless you used those shared components in your app. A lot of the benefit was coming from the well-designed IDE that actually made code snippets into WYSIWYG modules. All you really needed to do was write code for event handling and of course for the main app.

Originally posted by: Cogman
On the OOP statement. now-a-days, C++ programs will actually compile into faster code then C will. (dang it I can't find it now, there is a giant compiler comparison that proves this point). So if it is easier to make the program OO, why not? You're using a RAD tool anyways (not known for their code being speedy).

OO doesn't make programming easier, it just makes the development process more organized. With languages like C/C++ you are responsible for all aspects of the program during execution, so being able to keep things bundled into classes can make maintaining code more convenient and possibly improve QC. As for C++ being faster than C when compiled -- on modern CPUs these days I'd say the difference is negligible, especially because C++ is a subset of C...but on specialized CPUs such as those you'd find in a game console, ASM or C should still result in 5-10% more performance.

Compiler optimizations and code quality can play a big role (i.e. compiling a program on Intel's C++ compiler typically results in faster app execution than something like gcc, sometimes by large margins >10%). Ironically there are some instances where C# and Java outperform the equivalent operation in C++...but don't think I'd be coding something like a 3D game engine in Java or any other sandboxed language if max performance was my goal.

Finally, yes, Delphi is part of a RAD tool but it was designed from the ground up to work in that fashion. It produces binaries which are certainly on par with C/C++ programs when it comes to performance...certainly leaps and bounds above the performance you typically get with Visual Basic, which would be the most direct comparison to Delphi.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
OO doesn't make programming easier, it just makes the development process more organized. With languages like C/C++ you are responsible for all aspects of the program during execution, so being able to keep things bundled into classes can make maintaining code more convenient and possibly improve QC. As for C++ being faster than C when compiled -- on modern CPUs these days I'd say the difference is negligible, especially because C++ is a subset of C...but on specialized CPUs such as those you'd find in a game console, ASM or C should still result in 5-10% more performance.

I imagine you meant to say C++ was a superset of C, but in any event, I disagree that OO techniques don't make programming easier. But a long digression on that topic would thoroughly derail this thread, and would be ten years out of date to boot.