Archived

This topic is now archived and is closed to further replies.

What is the difference?

This topic is 6279 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Ok, I am new to coding, but know about C/C++ and BASIC, Assembly, and JAVA. What is so great about Pascal, Python, and Perl? Can you code games in any of these last three? How is Pascal compaired to C/C++? Is it as fast or as powerful? I guess what I am asking is can I do anything in these other languages like C/C++, BASIC, and Assembly? I am learning C++ and will move on to JAVA due to it''s similarities. Also would be good to know it for future job offers! Just wondering what peoples thoughts are on this. Windows SUCKS! Deal with it! if(windows crashes) { run Linux } else { yea right!! }

Share on other sites
Recently, I tried to do some generic programming in Pascal. We''re using Delphi in Uni and I thought it would be pretty cool to try out some RAD stuff. The thing I was trying to do was a generic Binary Tree, and boy, did I have a nightmare.

At first I tried using the Variant variable but I found out that it only did ordinal types. Finally i settled for Pointer, which is like a void * in C. Which equals YUCK. This is an area that C++ (IMHO) shines with its use of templates. Java falls short here as well.

As for Pascal being fast, it is fast. I''ve seen benchmarks where it equals C++ programs in terms of speed. It beats the pants of BASIC/VB in this respect.

Don''t know much about python or Perl. I shall leave it to others who are in the know.

Share on other sites
A programming language is just a means to an end. If you like Perl, I''m sure you could code up quite a nice game in it. However, it''s not a very good game-coding language. There''s almost no support for any sort of graphics (however, there are binding for things like tcl/tk under unix which lets you draw windows and things)

Pascal is not too bad, you can write pretty much anything, but as NuffSaid pointed out, it''s type system leaves a lot to be desired. There is a delphi binding for opengl, though, so you can do 3D in it.

I''ve not used python before, but I guess it''s really the same deal. There''s not much point using anything but C/C++ (maybe java or even VB) for writing games, other languages just don''t cut it, in terms of pure speed and useability. You can''t write DirectX stuff in anything but C/C++ or VB, and opengl isn''t available for many more languages either. Of course, you could write a text adventure in pretty much anything, but I don''t think that''s the sort of thing you''re looking at...

Share on other sites
Perl could be best used for server side of net/web based games or WAP phone text games. Not much besides that though.

Yeah, C/C++ is the way to go for games.

Share on other sites
The main advantage of learning various languages is in understanding languages in general. I think anyone serious about programming should learn enough languages that learning a new language is a fairly quick process. As for the reason when I started work after college the company I worked for what strictly assembler. They then moved to strictly COBOL and actually a variant off of COBOL called S-COBOL. They then went to being a mix of COBOL, PowerBuilder, Visual Basic and C/C++. They then began bringing in packages such as PeopleSoft that has their own languages. Also along the way there where various platforms with various scripting languages as well as utilities that you program using their own unique language. The chance that you can make it through an entire 40 year career knowing just one language is zero. As long as you are learning languages you might as well learn how to learn languages so you don''t find yourself a legacy because everyone switched to another language. You want to be on the leading edge of whatever your company/industry does, not on the trailing edge supporting legacy systems.

Seperately an important point is that differant languages excel at differant things. If you know various languages you will recognize those strengths and weeknesses. If you don''t know them then you will most likely struggle through forcing that round peg through that square hole.

Share on other sites
After reading your post, I''m beginning to wonder. How old are you Lil?

Share on other sites
Nuffsaid:

type PTreeNode = ^TTreeNode;     TTreeNode = record        // Node data here        Left, Right : PTreeNode;     end;

Share on other sites
Anon:
err... where does the data go? I''m looking for a way to implement generic programming. I know what trees are (I''m not that doh!). The only way to do that in Delphi would be to do something like this

type
TBTreePtr = ^TBTree;
TBTree = record;
tag : integer;
size : integer;
data : Pointer;
right, left : TBTreePtr;
end;

This is what I came up with. Data will point to the data (i.e. record, class, etc) that I want to hold. size will hold the size of the data, as it is a pointer, you can''t use SizeOf on it. tag will be what I use to sort the Tree data, if it is bigger, than the tag of the current node, insert on right, if smaller, then insert on the right.

It works, but it isn''t elegant.

Share on other sites
dean_harding said :-
----------------------------------------------------------------
A programming language is just a means to an end. If you like Perl, I''m sure you could code up quite a nice game in it. However, it''s not a very good game-coding language. There''s almost no support for any sort of graphics (however, there are binding for things like tcl/tk under unix which lets you draw windows and things)
----------------------------------------------------------------

Perl supports most of the API''s like openGL, ncurses, tk,tcl, fltk etc. How does that make Perl have almost no support for graphics when OpenGL itself is very well supported. You should check out cpan for it.

Perl has its best advantage though if you are in the security field, like making a port scanner etc. And another best bet to use perl is with cgi scripts where you need to enourmous error checking. Can be done with c/c++ but much easier with perl.

But I do agree perl isn''t good isn''t good for games coz an interpreter cum compiler isn''t good and also you can''t hide your code.

• 10
• 17
• 9
• 14
• 41
• Forum Statistics

• Total Topics
631067
• Total Posts
2997737
×