[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

1566.0. "M2 > Pascal - why?" by AYOV10::ATHOMSON (C'mon, git aff! /The Kelty Clippie) Fri Jul 29 1988 12:23

    I thought about adding to an existing note but none seemed to address
    these particular questions. 
    
    What are the main benefits and advantages of Modula II over Pascal ? 
    What are the major differences ?
    Can a Modula II compiler compile "basic" Pascal programs (presumably
    with a couple of IMPORT statements added) ?
    
    These questions are meant to be general and not directed at specific
    implementations of Modula II or Pascal.
    
    				Alan T.
T.RTitleUserPersonal
Name
DateLines
1566.1M2 better for big programsBIGALO::PFISTER_ROBI cant put *THAT* here.....Sun Jul 31 1988 19:4415
    The major advantage of M2 for the Amiga is the quality of the
    compiliers available versus the horrible pascal that exists!
    
    As a general rule, M2 wont compile Pascal, but the changes needed
    are pretty much trivial. as I ported about 2000 lines of VAX Pascal 
    to M2 in a few evenings. `WriteLn' as used in pascal isn't implemented
    the same way, so I/O can be a pain to convert.
    
    The major benefits of M2 is the ability to break stuff into `MODULES'
    (kinda like Ada) so you dont have monster 1000+ lines to deal with
    at a time, but you still get all the nice checking between the modules.

    The major disadvantage of M2 is the I/O
    
    Robb
1566.2Sounds great, but...ODIXIE::MCDONALDMon Aug 01 1988 11:3719
    > are pretty much trivial. as I ported about 2000 lines of VAX Pascal
    > to M2 in a few evenings. 'WriteLn' as used in pascal isn't implemented
    
    It's good do hear that M2 and Pascal are that similar.  I'm seriously
    considering buying the M2Amiga compiler.  I suppose some flavor
    of C would be best for development (since everything for the Amiga
    is written in C), but I'd like to have a language that's close enough
    to something I know that I can be immediately productive.
    
    Has anyone heard more about the M2Amiga compiler.  From reading
    previous notes, I got the impression that it was one of the best,
    but the last thing I remember reading about it seemed to hint that
    it was yet to be released.  Is it out yet?  Is it as good as claimed?
    Does anyone have it?  (Boy, can dis guy ask questions!)
    
    Any info would be appreciated.
    
    					-John
1566.3Modula 2 is a good choiceCLT::UTZMon Aug 01 1988 14:4718
    I have the Benchmark Modula 2 compiler and am very pleased with
    it.  It creates an environment for you.  When you boot off the disk
    you are placed in an Emacs type editor.  You create your modules
    and link from there.  The compiler and linker are fast enough, that
    I who am use to an 8800 at work don't complain.  That is saying
    that it is pretty fast.
    
    The modula 2 language is similar to Pascal.  You'll learn to love
    the type checking or hate it.  However, modula 2 has casting which
    helps a whole lot.  Also the IO leaves something to be desired but
    remember that the Amiga is a windowing system, so that if you are
    going to do any serious programming you won't be using WriteLn but
    instead the system calls.  Benchmark 2 comes with a complete listing
    of all the system calls.  As a professional programmer, I like modula
    2 and Benchmark's implementation.  I would recommend it over C to
    someone trying to learn to program.
    
    David
1566.4Where did I put that Visa...DIXIE1::MCDONALDSurly to bed, surly to rise...Mon Aug 01 1988 15:2512
    Sounds like it'll do the trick.  I still may buy a C compiler later.
    I'd like to learn C,  (If I can program in BLISS, C shouldn't pose
    any insurmountable problems)  but funds limit me to one compiler
    for now.  I need a hard disk worse than I need a C compiler.
    
    I take it you find Modula 2 powerful enough to do development work
    on the Amiga.  I was a bit concerned that Modula 2 wouldn't be as
    powerful as C.  I'd like a capable language, but from what I've
    seen of C, it looks pretty close to machine code. 
    
    
    					John
1566.5Does it need a turbo-charger?SNOC01::SIMPSONThose whom the Gods would destroy...Mon Aug 01 1988 22:4413
    re .3
    
    Like you I prefer working in Pascal/M2 than C.  However, I am concerned
    about two things: 1 Does M2Amiga support overlays (most of us still
    only have 512K) and 2 is the M2 object code as fast as C object
    code.  I ask this because on nearly every other machine I have used
    the Pascal/M2 implementations have not produced code that is within
    cooee of C, however much the manual claims they have been optimised.
    
    re .1
    
    Comments on M2's lack of IO is interesting when you remember that
    C by definition has none.
1566.6just as fastRANGLY::PFISTER_ROBI cant put *THAT* here.....Tue Aug 02 1988 07:2513
    M2 seems to be about as fast as 'C' in execution, and probably faster
    compilation (due to pre-compilation of modules) than some 'C'
    compilers. I have M2Amiga, and I haven't found any overlay support
    documented, but I have 1.5Meg anyhow.
    
    M2Amiga is great for catching guru's, as it's run-time system checks
    for most run-time traps, and can usually deallocate all your resources.
    
    (quite nice to avoid constant rebooting)
    
    M2 doesn't have any I/O by definition either...
    
    Robb
1566.7I know I've got one, somewhere..SNOC01::SIMPSONThose whom the Gods would destroy...Wed Aug 03 1988 00:0714
    re .-1
    
    Good to hear that M2Amiga executes quickly.  Do you have any idea
    about comparitive code sizes between M2 and C?
    
    By the way, by digging deep in my library of Byte's I found an In-Depth
    on Modula 2 in the August 1984 edition.  It is very comprehensive,
    and the article which compares M2, Pascal and Ada, both at the syntax
    level and the implications for implementations.  This is quite the
    best article of its type I have ever seen.  If anybody is really
    interested in this topic then this issue of Byte is well worth digging
    up.
    
    David
1566.8M2 can be larger than 'C'MTBLUE::PFISTER_ROBI cant put *THAT* here.....Wed Aug 03 1988 09:279
    The size of the code depends mostly on what you require for librarys
    for a peice of code. (stdIO is kinda large, as is the M2 I/O library's)
    M2Amiga has some overhead code (run-time system) that gets pulled into 
    every program so your small (ie: under 500 lines of code) will
    be considerably larger code size than if you did it in 'C'.  M2Amiga
    has a really efficient linking scheme with the Amiga internals which
    for larger programs, makes the code sizes similar..
    
    Robb
1566.9Is a hard disk required?MECAD::MURATORIRichWed Aug 03 1988 14:186
    Do I need a hard disk in order to use the Benchmark M2 development
    environment with 'reasonable' performance?  I have a two drive
    system with 1 Meg.
    
    Thanks,
    Rich 
1566.10I had no problem with the same setupCLT::UTZWed Aug 03 1988 15:0116
    I have the same setup - two floppy disk drives and 1 Mb memory.
    I had no problem using the Benchmark 2 development environment.
    Well, I seem to remember running out of memory one time when I had
    about 10 or 12 files all in emacs buffers at the same time and then
    I tried to run the program.  I simple removed a few of the .lis
    files from emacs and I was able to run.
    
    Oh, I was also keeping all the sources in the RAM: disk as well.
    Since I had everything in memory except the system modules, the
    compiler and linker were fast.
    
    
    Someone earlier asked about comparing M2 produced code to C code.
    I don't have a C compiler, so I can't even make a guess.
    
    David