View Full Version : Genaral Question about Programming Languages
Tuning
23rd September 2003, 11:47
I'm fresher to the field of programming.I have tried of VC++ 6 and C++.As there are many developers visiting the forum,I would like to know which language is suited an why u are using it.So that i could follow a path and decide which is best suited for me.Thanks:)
DAvenger
23rd September 2003, 15:04
Delphi for GUI coding and C++ for the hardcore stuff seem to be a good combination ;)
toraneko
23rd September 2003, 16:55
don't forget assembly language for even more hardcore optimization.
Tuning
23rd September 2003, 17:55
Thanks Davenger and toraneko.:)
esby
24th September 2003, 01:16
Personnaly i think any recent language can do the trick...
Delphi can be used for non GUi too...
In my opinion, of course if you want to go nuts,
and optimize with assembler parts,
it may be more easy or more practical if you are used
to do it in c++.
But i think it's more something coming from the coding habits
than from the 'speed' need.
No matter the language, you need to optimize the algorithm used,
supposed you make the good choice in these algos from the start,
optimization can be done in c++ or delphi undifferently,
of course they are more practical example in C++.
In some cases, you might try to use python too...
or even the good old perl...
depending of what are your needs...
esby
Guest
24th September 2003, 04:41
Originally posted by DAvenger
Delphi for GUI coding and C++ for the hardcore stuff seem to be a good combination ;) How do you call MS VC++ 6 routines from Delphi? Thank you.
esby
24th September 2003, 08:37
"How do you call MS VC++ 6 routines from Delphi? Thank you."
Mmmm I think i can say a bit about that...
example took from a vfw delphi port...
{-- ICCompress() - compress a single frame -----------------------------------}
function ICCompress(
hic : HIC;
dwFlags : DWORD; // flags
lpbiOutput : PBITMAPINFOHEADER; // output format
lpData : PVOID; // output data
lpbiInput : PBITMAPINFOHEADER; // format of frame to compress
lpBits : PVOID; // frame data to compress
lpckid : PDWORD; // ckid for data in AVI file
lpdwFlags : PDWORD; // flags in the AVI index.
lFrameNum : DWORD; // frame number of seq.
dwFrameSize : DWORD; // reqested size in bytes. (if non zero)
dwQuality : DWORD; // quality within one frame
lpbiPrev : PBITMAPINFOHEADER; // format of previous frame
lpPrev : PVOID // previous frame
) : DWORD; cdecl; external VFWDLL
implementation
function ICCompressBegin(hic: HIC; lpbiInput: PBITMAPINFOHEADER; lpbiOutput: PBITMAPINFOHEADER): DWORD;
Of course, the problems being that:
- I don't know if that fit your definition of //as MS VC++ routine.
- There are limits from C++ to delphi (and probably vice versa),
like the limited number of parameters for a function//procedure in Delphi.
Aka stuff like that:
// Non-portable: uses variable number of params
EXTERN_C HRESULT CDECL AVISaveA (LPCSTR szFile,
CLSID FAR *pclsidHandler,
AVISAVECALLBACK lpfnCallback,
int nStreams,
PAVISTREAM pfile,
LPAVICOMPRESSOPTIONS lpOptions,
...);
Another problem, is that you'll need do do an handler for the dll//library you want to use,
and taking in account the given restrictions already said, accounting too they are no hidden ones,
You may do something that will work or emulate it, but you'll encounter non-portable routines.
And if you are in a filter development context,
say Avisynth or vdub, you'll need to define a delphi handler
of the structure first, meaning a lot of work,
before being able to code a single filter.
And knowing the difficulty or reticences the avs developpers had to call avs 2.0X filters into 2.5,
you may encounter some headaches probably...
But I think the same is true with a reverse example, while it is less common,
since most encoding related applications are in c++ ,
but the example exists, eg: I've worked by the past on an IGS application with kernel & plugins using delphi 3 ...
esby
PS: I think the most beautiful solution is always the easier,
to stay in the original thread context,
If You need to do plugins programming of an application, it's better to use the application structure context and language, aka C++, Delphi or Python or whatever you use...
And of course, knowing several languages is always better.
jfcarbel
25th September 2003, 04:43
Had these links laying around, they may have been mentioned elsewhere on this forum:
Here is an article that talks about using C++ odjects in Delphi:
http://rvelthuis.bei.t-online.de/articles/articles-cppobjs.htm
http://rvelthuis.bei.t-online.de/articles/convert.htm
Here are a series of articles about using MSVC dll's with Borland.
http://www.bcbdev.com/articles.htm
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.