Poll

Which API do you use?

C/C++
89 (22.2%)
Delphi
175 (43.6%)
Visual Basic
103 (25.7%)
other
34 (8.5%)

Total Members Voted: 395

Author Topic: Which API do you use?  (Read 71363 times)

MathImagics

  • Posts: 37
Re: Which API do you use?
« Reply #100 on: 7 Jun '05 - 18:57 »
The only problem I see in VB is that it's slower then molasses in wintertime.

It's a well-kept secret, and one which may surprise you, that VB6 is perfectly capable of matching, and occasionally beating, C in processing speed.

I use VB6 for all my pet projects, many of which are highly computational and CPU-intensive(fractal generation, FFT analysis, etc).  I wouldn't part with it for love or money  8)

First of all, you can't rate VB performance in the IDE, a brilliant tool for developing and testing, but that's because the IDE is an interpreter.

Once you compile to native code, however, and (this is the key bit), you DISABLE the default "nursemaid" options (like "please check every arithmetic operation I perform for overflow, and all array refs for bounds errors), you'll find it just as fast as C, and because it has a pretty smart optimiser (which will do things like hold your loop index variables in registers) it can even be faster...

Combine the great IDE, the easy GUI, and the clever code-generation features (not to mention the COM capabilities), and it's no wonder my C compiler is gathering cobwebs

 ;)

MathImagics

  • Posts: 37
Re: Which API do you use?
« Reply #101 on: 7 Jun '05 - 19:01 »
Struth, mate, I only just realised you are talking about VB 4...   Gad!  :o

None of what I said applies to you, unfortunately  ... take my advice, beg borrow or steal a copy of VB6 .....  ;)

Stalkingwolf

  • Posts: 11
Re: Which API do you use?
« Reply #102 on: 21 Jul '05 - 07:51 »
Obj-C ( Cocoa )

Anon

  • Guest
Re: Which API do you use?
« Reply #103 on: 30 Jul '05 - 01:07 »
The big problem with VB is that its about as stable at nitro. If you like building crappy cheap apps that freak out a lot, VB is the place to go. VB is good for building quick demos of the software that you are going to build. For anythig real its just too flaky.  And its not about the coder, noone can build solid software in VB! I have seen VB apps without a single line of code crash after just a few seconds of "monkey-input".

The only thing "good" VB ever did was making a ton of people think that programming was simple. "VB, making the easy easyer, and the hard impossible!".

Torkell

  • Posts: 1169
Re: Which API do you use?
« Reply #104 on: 30 Jul '05 - 11:22 »
The big problem with VB is that its about as stable at nitro. If you like building crappy cheap apps that freak out a lot, VB is the place to go. VB is good for building quick demos of the software that you are going to build. For anythig real its just too flaky. And its not about the coder, noone can build solid software in VB! I have seen VB apps without a single line of code crash after just a few seconds of "monkey-input".
Odd. Not seen this with anything of mine. Could you give an example, and say what you mean by "monkey-input"?
BTW, I assume you're talking about Visual Basic 6, not any earlier versions or VB.net. VB.net is a ocmpletely different beast.

saivert

  • Posts: 36
I use everything.
« Reply #105 on: 5 Aug '05 - 19:27 »
I actually use any programming language I come across.

For programming languages that can be compiled to assembler code I have used these: C, C++, Visual Basic, Delphi

For scripting languages (run-time interpreted code) I have used these: VBScript, Perl, PHP, JavaScript

For managed code I have tried these: Java, C#, VB.NET

For other types of code these: NSIS (installer script)

Re: Delphi produces large executabls
Yes, Delphi makes big files, but this is because you are using the huge VCL when you make your programs. Take some time by designing your form (actually a dialog) with a resource editor. Compile the resource script and link it with your app. Then use Win32 API instead of the Forms unit and avoid use of Application object. Use GetMessage, DispatchMessage instead of Application.Run. When you do all of this, the EXE gets very small but you loose the RAD.

Re: Debate about High-level VB and low-level C.
Yes. Exactly. VB is high-level. And C is low-level when compared to VB. But technically C (and thus C++) is a high-level language. The only exisiting low level language is Assembly.

Re: Com issues
The Visual Basic run-time library contains a lot of wrappers for the low-level COM interface (meaning: loading and instantiating ActiveX objects).
Using COM in Delphi is also very simple as Delphi has a very COM friendly interface. You can also instantiate Automation classes without the need for a type library in Delphi.

When you create an ActiveX control or automation object it doesn't matter what language you use as COM makes one language load an object written in another language (avoiding conflicts between calling conventions and C++ classes vs. Object Pascal classes).

Have fun!

Chris

  • Posts: 1808
Re: I use everything.
« Reply #106 on: 5 Aug '05 - 20:09 »
Re: Delphi produces large executabls

I don`t will see any Negativ if the Exe-Size is a little bit larger...

We have August 2005  The most PC`s will have HDs of 200 GB or greater ...

and 500 kb are more or few are absolute indifferent ....



C/C++
fast
 but a little bit encapsulated and complicate to understand the Syntax
 no Runtime
Big Projects will need much time
Compiling will need much time
Good for Multimedia

VB
bad Multithread
easy to understand
but for Multimedia a little bit to slow
fast Compiling

Delphi
the perfect Bridge between VB and C/C++
a little bigger Exesize
very fast
No Runtime
Good for Multimedia
fast Compiling


Greest Chris
« Last Edit: 5 Aug '05 - 20:57 by Chris »

Torkell

  • Posts: 1169
Re: Which API do you use?
« Reply #107 on: 6 Aug '05 - 12:03 »
Re: Delphi produces large executabls

I don`t will see any Negativ if the Exe-Size is a little bit larger...

We have August 2005 The most PC`s will have HDs of 200 GB or greater ...

and 500 kb are more or few are absolute indifferent ....
Time was you could install windows on a 90 meg hard disk, and have more space than you'd ever need for word processing, spreadsheets, databases, and a bunch of games. Now people are struggling to fit all that on to 120GB disks.

Large executables also take up more memory, use more system resources, and are slower to load. And with the current trend for everything to be in XML, space requirements will just go up. Given that, I'm still happy when people take the time to trim unneeded junk out of files.

saivert

  • Posts: 36
Some binary size considerations.
« Reply #108 on: 17 Aug '05 - 17:10 »
When you f.ex use Delphi to create sleek fast application using a convenient RAD you will also have to use Borland's Visual Component Library. Without VCL you can't go anywhere without getting dirt on your hands.
The VCL consists of one particular unit (source modules in Pascal are called units) named "Forms" which handles the creaton of the top-level apllication object ("TApplication") which handles the Message queue and glues together forms (VCL's name on windows).
The Forms unit also declares a TForm class which handles creation of application windows and routes window messages to event handlers.

In Visual Basic you also have a huge library but this library is part of the VB Run-time DLLs. In Delphi this is linked statically with the executable.

MFC is also such a library that encapsulates most of Win32 API but MFC is also usually kept in separate reusable DLLs which means the application executable itself isn't so big.

You can separate out the VCL in Delphi applications as well but it's not a common practice among Delphi developers. This means a BPL file would have to be put in "windows\system32" folder.

So you have the choice between less clutter (link in Win32 wrapper classes) or less size (keep Win32 wrapper classes separate).

In Delphi the actual run-time libary (memory handling, string handling, kernel32 wrappers) is very small since Delphi's System and SysInit units use assembler code in it's functions to speed things up while in the same time making things small.

In one of my experiments I managed to get a smaller Delphi console application than the similar C version with the same functionality.

You can't judge the language by it's set of standard (or common) libraries. You can swap this out with your own library if you want to. There are many versions of the C standard library (printf, FILE* and family) and C++'s STL comes in many versions as well. The source code for Delphi's system libraries and VCL is included in the Enterprise versions.

Now we also got the D language which uses C stdio and stdlib.
Who has tested D language (http://www.digitalmars.com/d/)?

radio42

  • Posts: 4573
Re: Which API do you use?
« Reply #109 on: 20 Sep '05 - 20:13 »
Definitly a clean and good C# port would be a nice thing to have!

-> which is done now ;D : http://www.un4seen.com/bass.html#apis
« Last Edit: 11 Jan '06 - 10:01 by radio42 »

teknology

  • Posts: 44
Re: Which API do you use?
« Reply #110 on: 11 Jan '06 - 00:58 »
I'm trying to learn vb8 and bass at the same time. in my opinion vb8 is like learning another language.  :-\

Chesso

  • Posts: 17
Re: Which API do you use?
« Reply #111 on: 28 Feb '06 - 14:14 »
Looks like I am jumping on this topic rather late but for anyone interested in learning Borland Delphi( Object Pascal, Pascal is gone and beyond now ) then the two sites below will be of great help.

This is where you should start with learning Delphi and is great for future reference should you forget any of it:

http://www.delphibasics.co.uk

The only full on active Delphi help forum I came across, you can find most answers to most question via search and it also lists Delphi components and tips:

www.delphibasics.co.uk

Also it is true that going from VB to Delphi isn't too difficult at all, I myself migrated over because of VB's annoying RTL. Some advice for Delphi programmers as well, don't use Delphi's ShowMessage procedure, use the MessageBox API, it's easy to use and will save you some kb's on your executable.

I think you will all know what I chose heh heh  :P

dr_wrong

  • Posts: 8
Re: Which API do you use?
« Reply #112 on: 5 Mar '06 - 16:58 »
VB # 100  - . :D = - -- 

dr_wrong

  • Posts: 8
Re: Which API do you use?
« Reply #113 on: 5 Mar '06 - 17:00 »
(lol) any API support for http://wxbasic.sourceforge.net/