Link to home
Start Free TrialLog in
Avatar of scirocco1
scirocco1

asked on

Delphi vs Visual Basic

Why Delphi is more powerfull than Visual Basic? If both languages are supposed to be the same "OO".
Avatar of kretzschmar
kretzschmar
Flag of Germany image

listening . . .
Avatar of TheNeil
TheNeil

Delphi creates TRUE EXE's and not the Run-Time rubbish that VB outputs. Yes it's EXE's are typically bigger but they're faster, more powerful, and far easier to develop. Then again I would say that as I'm obviously a little bit biased...

The Neil
because Pascal is more powerfull than Basic I would say. Also concerning OO.

Floris.





Avatar of scirocco1

ASKER

TheNeil:
I'm a Delphi Developer but I need more information of what Delphi does and work that differs from VB.
Adjusted points to 50
ASKER CERTIFIED SOLUTION
Avatar of TheNeil
TheNeil

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
to The Neil: well spoken ;-)
I am a Delphi person but have to admit there are some good points for VB.

On the bad side of VB, you can give VB to a complete novice and they can produce something quickly. This is because MS$ made every attempt to make life easy for the programmer. For instance in Delphi to show an integer to the screen you need to convert it to a string then display it. With VB you simply display it. Internally VB must compensate and do the conversion for you. Once you get lazy you are going down the dark path to un-optimized programs. Anytime you shortcut coding in VB you are pentalized since VB now has to do extra work. Delphi on the other hand makes you work, there are times when Delphi will inform you that some of your code is not even needed! I use VB and Delphi and notice many times that VB UI is much slower then Delphi.

On the good side of VB, once you have gotten to know it you can make it fairly close to Delphi speed (except for UI stuff). I just came back from a VB conference (VBITS) were there was a fellow how wrote many of his own functions in (using plain VB) to replace many of the standard VB routines, he demo's the speed difference. In many of the examples his code was many many times faster. Point being is you have to approch much of VB as C developers did in the early days, write your own code. Well C programmers did it because there were no internal routines i.e. positioning the cursor on the screen.

Anyway this topic can go back and forth depending on who you talk too. I am in the Delphi world for many sound reasons, it is simply the best with a company who is really to small to rub up with MS$ (even with the merger). Another bad thing about Delphi is that many IT managers will not go with Delphi simply because it is _not_ an MS$ product.

If your intent is to be a professional then my suggestions is use the right language for the job. Whenever possible look at Delphi first. When IT managers tell you to use VB, suggest Delphi, if the answer is no, well hopefully you have enough knowledge of VB to do the job. It's all in the toolbox.


Kevin
When I look on a Visual Basic I don't understand a thing! It's incredibly hard to read in my oppinion.

Example 1.
Function calls:
MyFunc "hi", 15, 12234

Where's the parantheses?
and if the function returns a result I don't want I have to call it like this:

Call MyFunc "hi", 15, 12234

1-0 to Delphi


Example 2.
Variable declaration:
Wan't to declare multiple variables of the same type, welcome to hell.

Delphi:
var
  i, j, k, l: integer;

VB:
Dim I as Integer, J as Integer, K as Integer, L as Integer

Example 3.
Object Oriented... What is that?

Example 4.
You get a lot of marketing people on your neck telling you how easy it is to create stuff... Heck, the other day they made a virus just for fun...

And it goes on...
One good thing with VB though, Microsoft supports it....
Petriwork,

I agree with you that Delphi is far, far better than VB but (and don't take this the wrong way), I think you're being a little picky on what are in fact just syntax changes. You want REAL nightmares then jump across to C (or worse still Visual C++) and then you'll see totally unreadable code (or maybe journey into Lisp land if you're a parenthesis fan - you won't be so keen after reading THAT). You're right on the idiot merketing people front though and Microsoft does support it (but is that a plus point?)

Object Orientated - so much a part of Delphi that it does it without you even realising (and believe me it makes life so much easier)

Kevin: You sum it up perfectly - use the right tools for the job. VB is good as an intro to coding (maybe a stepping stone to Delphi), C gives you raw speed, and Delphi has the right blend of ease-of-use and power (I'd also say it's the best for every job but I'm biased so won't).

The Neil
Also note that delphi gives you way  better access to the win32 api, inline asm (totaly no-exisent with vb), real oo (imagine an "oo" language without constructors and no inheritance, only vb).

Simply put, it if can be done easily in vb - it can be done *very* easily, or (perhaps) not at all.


Gl
Mike
gallaghe:

The last time I worked with VB was translating code from VB 4.0 to DELPHI 1.0. Now, I have VB 5.0,6.0 , DELPHI 5, installed on my machine and I have to say that DELPHI has a better interface since VB 4 to work with and there is no big deal to convert or work with strings in DELPHI. So this phrase: "This is because MS$ made every attempt to make life easy for the programmer." isn't true for VB and other applications.

TheNeil, hehe... Well, he didn't ask about why we prefer Delphi before C... That would be too long a speach anyway... Must be so fun...

Regards,
  PetriWork
gallaghe:

The last time I worked with VB was translating code from VB 4.0 to DELPHI 1.0. Now, I have VB 5.0,6.0 , DELPHI 5, installed on my machine and I have to say that DELPHI has a better interface since VB 4 to work with and there is no big deal to convert or work with strings in DELPHI. So this phrase: "This is because MS$ made every attempt to make life easy for the programmer." isn't true for VB and other applications.

gallaghe:

The last time I worked with VB was translating code from VB 4.0 to DELPHI 1.0. Now, I have VB 5.0,6.0 , DELPHI 5, installed on my machine and I have to say that DELPHI has a better interface since VB 4 to work with and there is no big deal to convert or work with strings in DELPHI. So this phrase: "This is because MS$ made every attempt to make life easy for the programmer." isn't true for VB and other applications.

Petriwork,

Please God don't let anyone post the question "C vs Delphi". The Ex-Ex server will get swamped...

The Neil =:)
shall i post one ? ;-)
NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO...please don't

The Neil =:O
ok,ok, this was loud enough,
i will not do it :-))
but if someone posts one, it will be fun, rite   :)
Apologies for the outburst but just the thought of a "C vs Delphi" question completely fills me with dread.

It'll be fun if you're NOT a C fan and I suppose anyone sticking up for the hideous one letter language will get ripped to bits for all eternity. Hmmmm I wonder...

The Neil =:)
Actually C is very usefull for some tasks that delphi simply isn't suited for.  Would I write a db front end in C, no, would I write a device driver in delphi, prob. not.  Would i use either for a cgi app, yes.  
Delphi is fast, powerfull & fun to use but it simply can't beat C for portability. And no, this post does not mean I would condone a c vrs delphi thread, it simply points out that the two do not "compete" - it would be like comparing, say, delphi & sql



GL
Mike
Mike

I can see exactly where you are coming from and agree that everything is the best at some aspect of programming. In this case we're just poking fun at the (nasty) beast that is C. You have to admit, it's not the easiest of languages when you compare it to Delphi and VB. Now I know the answer I'll get back will be along the lines of "Maybe it isn't but it does tie in with the API, and it's really powerful" and that's fine - me though, I prefer my coding to be quick and simple.

Of course all Delphi coders should still unite and try to rid the world of the damn thing though...

The Neil
Read here for some funny facts about VB:

http://www.exe.co.uk/stob/stobpull.asp?page=jan00.html

:-))

Regards, Madshi.
Later on, I'll ask what things Delphi can't do?
Later on, I'll ask what things Delphi can't do?