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 71472 times)

Ian @ un4seen

  • Administrator
  • Posts: 20437
Which API do you use?
« on: 1 Dec '02 - 19:58 »
I thought it might be interesting to see which BASS API is the most commonly used by the forum's visitors :)

In the case of using more than one, please choose the one you use the most.


Torkell

  • Posts: 1169
Re: Which API do you use?
« Reply #1 on: 1 Dec '02 - 20:31 »
I wouldn't be suprised if C/C++ won, and VB came second, with the rest behind...

Ingolf

  • Posts: 81
Re: Which API do you use?
« Reply #2 on: 2 Dec '02 - 12:13 »
Haha, not really...

Torkell

  • Posts: 1169
Re: Which API do you use?
« Reply #3 on: 2 Dec '02 - 20:12 »
...since C/C++ is (I think) the most common programming language, and VB is second as it's so easy to start programming with. To prove that, I will set this challenge:

Make a program with a button which pops up a message box that says "Hello World" with just three lines of code!

I seriously doubt that anybody will be able to do that in C/C++, or most other languages for that matter. But in VB, it's easy. Create a new project, add a command button to the form (accept all defaults), and paste in the following code:

Code: [Select]
Private Sub Command1_Click()
 MsgBox "Hello World!"
End Sub


Volia! Compile, and execute, and you be amazed at what you can do with 3 lines of code!

Maybe I should stop bragging about VB now...
« Last Edit: 2 Dec '02 - 20:13 by BoggyB »

evilbadz

  • Posts: 15
Re: Which API do you use?
« Reply #4 on: 2 Dec '02 - 22:01 »
Just because you can make a program in 3 lines of code that has a window, a button, and pops up a nice little message box does not make that language a good thing.

RevG

  • Posts: 454
Re: Which API do you use?
« Reply #5 on: 3 Dec '02 - 00:34 »
Well here is a c++ program that shows a message box in just a few lines of code. This is all there is. Compile, and execute. done.

#include "windows.h"

void main()
{
     MessageBox(NULL, "Hello World!", "Hello World!", MB_ICONINFORMATION);      
}

RevG

  • Posts: 454
Re: Which API do you use?
« Reply #6 on: 3 Dec '02 - 00:40 »
Here is a c++ version using a button on a form. You create a new mfc dialog app. Add a button to the dialog. and paste the following code:

See it's just as easy in c++ as it is in vb.

void CMfcHelloDlg::OnButton1()
{
     MessageBox("Hello World!");
}

Ingolf2

  • Guest
Re: Which API do you use?
« Reply #7 on: 3 Dec '02 - 08:24 »
In delphi...

procedure Button1Click(Sender: TObject);
begin
 ShowMessage('Hello World!');
end;

or with the windows unit as described by RevG

Ingolf2

  • Guest
Re: Which API do you use?
« Reply #8 on: 3 Dec '02 - 08:26 »
Also, I think you can't say that C++ or VB are the best programming languages only because they are just used more often (which I doubt with VB), and you can never say that if you haven't used other languages before, which can be better without you knowing it...

Azoth

  • Posts: 107
Re: Which API do you use?
« Reply #9 on: 3 Dec '02 - 11:42 »
I'm really suprised that Delphi has more votes than VB or C++. To any of the Delphi coders out there, is it fairly easy to move from VB to Delphi. I've been looking into Delphi for some time now. Mainly to get away from the need for runtime libraries. I know it is based on the Pascal lanuage, which I don't have any expierence with. Old timer here. Came from a C/Basic/VB3/Cobol background.

.Azoth.

Nikse

  • Posts: 5
Re: Which API do you use?
« Reply #10 on: 3 Dec '02 - 12:00 »
I think Delphi is fairly easy to use. If you know vb you will have no problem with Delphi.

At work I code VB, but at home I code Delphi.
In my opinion most things works much better in Delphi, but VB has a better debugger and IntelliSenese.

Azoth

  • Posts: 107
Re: Which API do you use?
« Reply #11 on: 3 Dec '02 - 12:52 »
Nikse,
 Thanks for the info. Will have to DL the Delphi Architect Trial from Borlands website. I've become quite an expert @ VB, being able to work around most of it's limitations using custom built controls, the Win32API, and Subclassing. But I would like to be able to code a self sustaining EXE. No run-time libs.

.Azoth.

Torkell

  • Posts: 1169
Re: Which API do you use?
« Reply #12 on: 3 Dec '02 - 20:03 »
Erm...

*runs and hides* ;D

Anyway... I'm suprised that Delphi is winning. I'd never really heard of Delphi before, so this is a suprise. Or is it just a large amount of VB and C/C++ programmers are ignoring the topic, while the Delphi programmers are out in force to show that it does exist?

Actually, if Delphi is easy to move to from VB then I might be interested. Anyone know how much it costs/where I can get it from/any good guides to learning it (preferably low-cost as I don't like spending *that* much on something)?

I'm going to modify my original prediction:
1st = Delphi
2nd = C/C++
3rd = Visual Basic
4th = MASM or TMT Pascal
*others*

Azoth

  • Posts: 107
Re: Which API do you use?
« Reply #13 on: 3 Dec '02 - 22:08 »
BoggyB et. All,
   Both Pricewatch and PriceGrabber list the Personal Edition of Delphi 7 for about $100 or the Professional "Academic" editiion for about the same price. As for a good book, haven't found one yet, going to Borders tomorrow to browse... Will let ya know what I find.

BTW. We may want to move this to a new thread :)

.Azoth.

Olego

  • Posts: 557
Predictions
« Reply #14 on: 4 Dec '02 - 03:28 »
Quote

I'm going to modify my original prediction:
1st = Delphi
2nd = C/C++
3rd = Visual Basic
4th = MASM or TMT Pascal
*others*


You know, they're no longer predictions, they're results.  ;D ;D ;D

:laugh:  But I think you'll be correct!  ;)

~Olego~

paddy

  • Posts: 142
Re: Which API do you use?
« Reply #15 on: 4 Dec '02 - 08:32 »
I use VB but I agree that Delphi will win. Probably because it bridges the gap between cryptic C/++ and user friendly VB.

1. You can cleanly Multithread in Delphi. In VB you end up with a big headache and lots of GPFs.

2. Microsoft has chosen to go the wrong way with VB.NET which now seems more suited to programming business Apps (no more general purpose programming).

3. Of course C/++ is the king of them all but I shudder when I think of the learning curve!

I am seriously considering a move to Delphi and C++. Then I'll only be using VB6 for rapid prototyping at the concept stage.

Rgds.

Ingolf2

  • Guest
Re: Which API do you use?
« Reply #16 on: 4 Dec '02 - 09:07 »
The only big difference for me between Delphi and C++ is the way the code is written in. In Delphi you can use words to declare stuff (begin, end, etc.) and in C++ it's {} and stuff. I don't have any problems with structuring stuff in C++ that I made earlier in C++, only the different symbols and rules.

I use Borland Delphi 7 Studio and Borland C++ Builder 6 from which the environments are almost the same.

But... I am working in Delphi for 4 years now, and 1 month in C++, so who am I...

Torkell

  • Posts: 1169
Re: Predictions
« Reply #17 on: 4 Dec '02 - 19:50 »
Quote

You know, they're no longer predictions, they're results.  ;D ;D ;D

:laugh:  But I think you'll be correct!  ;)
~Olego~


Are they? No-one's signed up for MASM or anything like that.
Yet. ;D


Quote

BoggyB et. All,
   Both Pricewatch and PriceGrabber list the Personal Edition of Delphi 7 for about $100 or the Professional "Academic" editiion for about the same price. As for a good book, haven't found one yet, going to Borders tomorrow to browse... Will let ya know what I find.

BTW. We may want to move this to a new thread :)

.Azoth.


Thanks, will look into it.

gregm

  • Posts: 49
Re: Which API do you use?
« Reply #18 on: 9 Dec '02 - 21:54 »
I started out in pascal, it was only natural to move to delphi for me, which I've been using for at least 5 years now. Since then, however, I've learned many other languages, including C, C++, x86 ASM, Java, and PHP. I've used more - VB, Perl, Jscript (asp).. - just not on a regular basis; it would take me a bit more work to code an app in one.

Move of my development has been for linux and web-based stuff, and I use PHP almost exclusevly for it. PHP is a cross-platform, psudeo-typed interpreted language. It makes it an extremely fast language for development, although comparatively it is 'slow' (the speed of modern processors makes this a non-issue tho).

I've also recently come to the conclusion that C/C++ are not suited for general application development. They're too much of a low-level language. I find when coding in C, I spend more time worrying about where variables are stored and passing pointers properly than I do actually coding the logic. In my opinion, when you're programming an application, you should ONLY have to worry about the logic.

Delphi is better for abstracting memory stuff, but once you need to do something a bit more complicated than it's designed for, you have to deal with pointers just as much as C AND work around delphi's abstractions (which means you have to understand how it all works).

Java is better as far as programming goes (cross-platform = good), but it's VM implementation on some platforms is slow.

Really, I haven't found a good language for real application development yet. But I know that C definately isn't it. :)


paddy

  • Posts: 142
Re: Which API do you use?
« Reply #19 on: 10 Dec '02 - 08:49 »

Quote

Microsoft has chosen to go the wrong way with VB.NET which now seems more suited to programming business Apps (no more general purpose programming).
...

I am seriously considering a move to Delphi and C++. Then I'll only be using VB6 for rapid prototyping at the concept stage.


Just got a peek at VB.NET 2003. Microsoft claims that it's as fast and as powerful as C#. Thre's also more multithreading options and blah blah blah...

I guess I'll stick with VB for now.

CopyCat

  • Posts: 5
Re: Which API do you use?
« Reply #20 on: 10 Dec '02 - 19:07 »
Anyone aware of the PowerBasic compiler?! http://www.powerbasic.com. Apparently they are working on a Linux thing too, for those more interested in that platform.

Check it out, it's definitely worth a few minutes..

Jcl

  • Posts: 52
Re: Which API do you use?
« Reply #21 on: 10 Dec '02 - 22:53 »
I currently use both C++ and Delphi. Started using C on a PC like 6 years ago (I had done some ZX Assembler and a lot of Basic before), also used pascal for some tiny things. Never really used VB for anything serious (just opened it and put some buttons around).

I am fluent in C/C++, Delphi, x86 Assembler, JavaScript and PHP, but i've also used many other languages for specific things. Gotta try C# some day, although i made a simple "hello world" application and looked to me much like Java (and I hated Java). I guess i'll wait for Delphi.Net before making .net targeted applications, and maybe play a bit with C# when DX9 comes around. I'm using OpenGL as a 3D API, but want to learn D3D when DX9 final gets out... (yes, I know public beta is around... waiting for final is just an excuse :) )


Patrice

  • Posts: 72
Re: Which API do you use?
« Reply #22 on: 12 Dec '02 - 16:13 »
CopyCat

Yes, I am very aware of PowerBASIC, because it is my compiler of choice.
Same power as C with ease of a BASIC syntax and built-in ASM, data ranges from BYTE to 64-bit QUAD + pointers + ASCIIZ, etc.
Produces DLL, EXE, and console applications.
No runtime, no ocx, no hassle ; just small fast and lean pure 32-bit code.

You can see what could be done with it if you download my freeware Audio Player (using of course BASS.DLL).
See it at:
http://www.zapsolution.com

Note: I have translated the whole BASS API to PowerBASIC.

CopyCat

  • Posts: 5
Re: Which API do you use?
« Reply #23 on: 12 Dec '02 - 17:36 »

Quote
Yes, I am very aware of PowerBASIC, because it is my compiler of choice.


I know, as I have owned PB/DLL for a while myself. Although I've not yet made very much with it.

Quote
..download my freeware Audio Player.


As usual, very cute! Winlift makes a difference!

Quote
Note: I have translated the whole BASS API to PowerBASIC.


Care to share?  ::)

Patrice

  • Posts: 72
Re: Which API do you use?
« Reply #24 on: 12 Dec '02 - 18:21 »
CopyCat

Yes, I could share it with you.
Send me your e-mail.