Pascal or Ada

I'm having trouble deciding. I have to many pros and cons for each.

Ada
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Pros:
  GNATBench for eclipse (I am a java dev)
  GPS is a nice IDE
  Ada emacs mode
  Fast
  AJIS for Java interfacing
  AWS for web
  Many Targets
Cons:
  No good up-to-date Ada 2012 documentation
  No good up-to-date Ada 2012 books
  No community (forums, sites, etc.)
  Difficult
  Stupid type system
  GPS Pro edition is per year licensing 


Pascal
1
2
3
4
5
6
7
8
9
10
11
Pros:
  Lazarus is nice
  If I want to go pro I can just get Delphi
  One good book: http://www.blaisepascal.eu/index.php actie=./subscribers/UK_Book_Department (in an amazing package)
  Amazing community -- forum gets my Q's answered in minutes 
Cons:
  http://homepages.inf.ed.ac.uk/rni/papers/realprg.html
  slow
  no java interfacing (that I am aware of)
  no eclipse plugin (that I am aware of)
  Boring 


My mains problem with Ada is books and documentation, and my main problem with pascal is java interfacing, and it is highly criticized. I want to know which should I use??
It depends on what you are wanting to do with it and if you are wanting to interface it with Java. If you want it to interface with Java, then the answer is obvious from those list of pros and cons.
It will be used for Java interfacing, general application development, OS development, web development, and network security development. My only problem with Ada is the documentation/book problem.
If you are needing Java interfacing, then you will have to do your best to learn some version of Ada. I tried once but never installed Gnat because it removes GDB and installs GDB-Minimal in place of it.
All those Pascal cons are LIES. Yep. (Except maybe the last one. That's individual opinion.)

RE: Real programmers don't use PASCAL.
First off, you can tell it's ancient Pascal hater crap to begin with because it's in ALL CAPS. NO ONE USES THAT ANYMORE. THE ONLY PEOPLE WHO EVER DID WERE PEOPLE WHO PROGRAMMED IN BASIC OR FORTRAN.

Granted, old Pascal pretty-printers put all of the Pascal keywords in all-caps.

All of the arguments in papers like that are invalidated by modern Object Pascal.


RE: Slow
Pascal swims circles around every other language you can name, in terms of compile-time, run-time, and development-time.


RE: no java interfacing
Object Pascal is designed to natively interface with system stuff, including COM/OLE objects that Java exposes.

Google around "XE5 Java" and "JNA Delphi" for more.


RE: no eclipse plugin
There are a few
https://www.google.com/search?q=eclipse+pascal

...but not many people use Eclipse when programming in Pascal
(Because the native IDE is superior.)


RE: Boring
I suppose. I think the language is cleaner than C and C++.
(Though it has gotten a bit weirder as late.)


As for Ada... I've never had any desire to use it. (AFAIAC, it's a butchered Pascal, but that's my opinion. Obviously, I don't work for the government.)

If your make-it-or-break-it decision is on interfacing with Java, Ada might be the right choice for you... but I don't know for sure.
Honestly, I use geany for all my code no matter the language. Though, seeing Free Pascal's IDE ( http://prntscr.com/3ctkk6 ) makes me nostalgic because my first IDE for learning C++ was RHIDE ( http://www.dusk-and-dawn.com/wp-content/uploads/2008/08/ch07_rhide.jpg ). Nostalgia makes me wish I could find one like that for all the languages (yep I'm retarded).
Ah, good old RHIDE. I never used it much. I stuck to TP4's IDE for everything. (RHIDE was the freeware version of Borland's development IDEs, overloaded with all kinds of stuff. A primitive version of Code::Blocks or Eclipse or etc. You can still get it, actually. http://www.rhide.com/)

These days, though, computers come with slick GUI interfaces...

If you are using Free Pascal, just download the Lazarus IDE. It will give you everything you need, including the LCL, which is what you really want to develop application software. Keep in mind, though, that Lazarus is the poor-man's version of the Delphi IDE, so it is primitive in comparison to XE5's current setup (and still has some obnoxious bugs).

Here's wishing I had the funds to buy XE5. :o(

Believe it or not, I still develop mostly using my old Delphi 5. It can still do everything.
Yeah, I've been playing with older languages the past few months. I've dabbled in Cobol, Fortran, Ada, and Pascal. I know some people don't care for them, but I just find all languages fascinating.

I'm looking into Lazarus, but sadly RHIDE is outdated as I've already tried compiling the source from there and just got errors.
RHIDE was compiled with an ancient (non-standard) compiler called DJGPP, IIRC. You'd have to find that to compile it.
BHXSpecter wrote:

I've already tried compiling the source from there and just got errors


Are you sure that it's the compiler and not your sources? :Pjk

Yeah, I've been playing with older languages the past few months. I've dabbled in Cobol, Fortran, Ada, and Pascal. I know some people don't care for them, but I just find all languages fascinating.


same here I was especially dissapointed at COBOL
COBOL definitely has some getting used to if you have never used it:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
       IDENTIFICATION DIVISION.
       PROGRAM-ID. COBOL1.
       AUTHOR.     BHXSPECTER.
       DATE-WRITTEN. 04/24/2014.
       DATE-COMPILED. 04/24/2014.
       ENVIRONMENT DIVISION.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 WS-A		PIC 9(3).
       01 WS-B		PIC 9(3).
       01 WS-C		PIC 9(4).
       PROCEDURE DIVISION.
		   MOVE 100 TO WS-C.
		   MOVE 200 TO WS-B.
		   COMPUTE WS-A =WS-B + WS-C.
		   DISPLAY "C VALUE " , WS-C.
		   DISPLAY "B VALUE " , WS-B.
		   DISPLAY "A VALUE " , WS-A.
		   STOP RUN.
C VALUE 0100
B VALUE 200
A VALUE 300

Fortran is the same:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! computes arithmetic, geometric and harmonic means

PROGRAM ComputeMeans
   IMPLICIT NONE 

   REAL :: X = 1.0, Y = 2.0, Z = 3.0
   REAL :: ArithMean, GeoMean, HarmMean

   WRITE(*, *) 'Data items: ', X, Y, Z
   WRITE(*, *)

   ArithMean = (X + Y + Z)/3.0
   GeoMean = (X * Y * Z)**(1.0/3.0)
   HarmMean = 3.0/(1.0/X + 1.0/Y + 1.0/Z)

   WRITE(*, *) 'Arithmetic mean = ', ArithMean
   WRITE(*, *) 'Geometric mean  = ', GeoMean
   WRITE(*, *) 'Harmonic mean   = ', HarmMean

END PROGRAM ComputeMeans
Data items:    1.00000000       2.00000000       3.00000000    

 Arithmetic mean =    2.00000000    
 Geometric mean  =    1.81712067    
 Harmonic mean   =    1.63636363    


EDIT:
You weren't kidding. Ada has very limited resources. Only sample I've found so far is this:
1
2
3
4
5
6
with Ada.Text_IO;

procedure hello_world_1 is
begin
	Ada.Text_IO.Put_Line("Hello, World!");
end hello_world_1;
Hello, World!

Though, now I'm starting to play with Pascal too:
1
2
3
4
5
6
7
8
program HelloWorld;
uses crt;

(* Here the main program block starts *)
begin
	writeln('Hello, World!');
	readkey;
end.
Hello, World!


Sticking to learning COBOL right now because I know a few finance companies in town that are looking for in-house COBOL programmers. I'll enjoy learning the others still though.
Last edited on
My COBOL problem is the whole PIC thing. It's like remembering an entire jump table for me. That and getting user input is a pain. I know simple Ada, but the type system always gets me :\
Last edited on
BHX Specter wrote:
Ada has very limited resources. Only sample I've found so far is this:

http://rosettacode.org/wiki/Category:Ada
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
with Ada.Text_IO;  use Ada.Text_IO;
 
procedure Roman_Numeral_Test is
   function To_Roman (Number : Positive) return String is
      subtype Digit is Integer range 0..9;
      function Roman (Figure : Digit; I, V, X : Character) return String is
      begin
         case Figure is
            when 0 => return "";
            when 1 => return "" & I;
            when 2 => return I & I;
            when 3 => return I & I & I;
            when 4 => return I & V;
            when 5 => return "" & V;
            when 6 => return V & I;
            when 7 => return V & I & I;
            when 8 => return V & I & I & I;
            when 9 => return I & X;
         end case;
      end Roman;
   begin
      pragma Assert (Number >= 1 and Number < 4000);
      return
         Roman (Number / 1000,       'M', ' ', ' ') &
         Roman (Number / 100 mod 10, 'C', 'D', 'M') &
         Roman (Number / 10 mod 10,  'X', 'L', 'C') &
         Roman (Number mod 10,       'I', 'V', 'X');
   end To_Roman;
begin
   Put_Line (To_Roman (1999));
   Put_Line (To_Roman (25));
   Put_Line (To_Roman (944));
end Roman_Numeral_Test;
MCMXCIX
XXV
CMXLIV
Topic archived. No new replies allowed.