What are the good and bad sides of these languages?

Started by
15 comments, last by ghostboy 23 years, 3 months ago
multitap:

You can write your own object system and avoid reliance on c++ classes. You can also use your own linking system as well as create your own object format. A c compiler can impliment data checking and security (as well as other things), but doesn''t do it for speed reasons. C has no disadvantage to Java (or any language that claims to be multi-platform) when it comes to multiplatform support and portability; the only difference is you can decide on your own interface with C. Ever heard of multiplatform libraries?
I completely respect that you dislike C++. Even I avoid heavily using C++ class systems, mainly for the EXACT reason that you stated here. I just don''t rely on a language for these things that you seem to require them to do.

cmaker

- I do not make clones.
cmaker- I do not make clones.
Advertisement
I happen to know FORTRAN so I thought I would comment on it a bit:

FORTRAN is a language specifically designed for fast, efficient, and accurate number crunching. I''ve used it for Fourier analysis and satellite orbital maneuver calculations, and for that specific use it''s very good. I would guess that most satellite orbital maneuvers are still done with engines built in FORTRAN. FORTRAN is NOT good for games. It has very little UI support and what it does have I would term "really freaking painful". I doubt that FORTRAN will entirely go away any time soon because it''s used in so many critical calculation engines (when you''re flying a $250mill satellite, you don''t want to be trying your orbital calculation engine for the first time) so while it won''t vanish, most of the new stuff is done in C++.

-fel
~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~
quote:
C/C++ do not include functions as a first-class object

Most languages don''t... not Pascal, Delphi, Fortran, COBOL, BASIC, ADA, Modula, ... Are you a fan of ML & LISP?

Magmai Kai Holmlor
- The disgruntled & disillusioned
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Felisandria nailed the head on Fortran, and no one really talked about COBOL so..

COBOL (COmmon Business Orientated Language) is mainly use for banks, manufacturers, basically any large organization with data handling, etc.

I know the language fairly well, and I really hate it. The syntax is extremely verbose, basically all code is just English words. Nearly everything is coded in complete UPPERCASE, and because of the verbose format, all code is horribly messy and long. You also have to end statements with a period, boosting the sentence-appearance. Here is a chunk of COBOL code.

IDENTIFICATION DIVISION
PROGRAM-ID. SUM-OF-PRICES.
AUTHOR. TERENCE-PRATT.
SOURCE. PROGRAMMING-LANGUAGES-2ND-EDITION-1984
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT INP-DATA ASSIGN TO INPUT.
SELECT RESULT-FILE ASSIGN TO OUTPUT.
DATA DIVISION.
FILE SECTION.
FD INP-DATA LABEL RECORD IS OMITTED.
01 ITEM-PRICE
02 ITEM PICTURE X(30).
02 PRICE PICTURE 9999V99.
02 FILLER PICTURE X(44).
(and so on and so forth)

Ugly, huh?

But, ironically, COBOL is the most used language in the entire world, even today. There are more programs written in COBOL then in any other single language. Hard to believe, huh.



Edited by - multitap on February 1, 2001 10:31:49 PM
quote:
It is remarkable that most security alerts in operating systems are related to buffer overruns in C code, because the language doesn''t help in any way to automatically ensure safety -- unsafety is the default, and manually ensuring it is a long, tedious, difficult task. A higher-level language could fully automatize safety, making it the default, whereas it would be unsafe operations that would have to be explicitly coded.

i guess you are talking about bounds checking on arrays.
like
  int myArray[5];myArray[8] = 10;  

now you shouldnt ever do something like that but the compiler wont complain (i dont think). But the reason why c/c++ doesnt do bounds checking on this is b/c it would REALLY slow down the execution of your program if every time you access an element of an array the processor would have to go through an additional 3 to 6 instructions to see if it is ok to use
Now how many of you use arrays in your programs and games ? How many of you use ALOT of arrays in your game ? I rest my case.

"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
We are creating a Multi-player space strategy/shoot-em-up/RPG game.
Development is well under way and we do have a playable demo.
Always looking for help.
Digital Euphoria Soft

Everybody who tries to shoot C/C++ seems to try the dangling pointer/array bounds approach.

Yet having used C for quite some time (moved to C++ 2 months ago), I can''t remember accessing a dangling pointer or an array element that was out of bounds. Sure, I did that when I was starting to program (like 4 years ago) but I''m really trying hard to remember a recent case where I actually did that.

Does anyone else feel this way?
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
What about range checking for dynamically allocated arrays? For example, the palette in a BITMAPINFO? If you implemented range checking, it wouldn''t be possible to access it even if you''d allocated memory for it.

This topic is closed to new replies.

Advertisement