gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] Daydreaming about another language to emit


From: Patrick
Subject: Re: [open-cobol-list] Daydreaming about another language to emit
Date: Fri, 04 Oct 2013 15:42:47 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130917 Thunderbird/17.0.9

On 10/04/2013 03:23 PM, Michael Anderson wrote:
On 10/03/2013 10:31 PM, Patrick wrote:
"thinking" about what other languages might be better then C for
intermediate generation.
Patrick,
I write this most respectfully, as I do like your enthusiasm, really!

To put it bluntly, You should fully understand the C language before
contemplating this change.

At least answer the question:
Why is every popular VM/Interpreter, compiler and operating system
written using C?

Philosophically, programming is the ultimate smoke and mirrors! At it's
lowest level you are simply manipulating an infinate array of 1's and
0's, some are machine instructions, other 1's and 0's represent data,
and the memory addresses of these. Other than writing the machine
instructions manually, C is the most limitless method to manipulate
these 1's and 0's. All other popular languages are limited in
comparison, and rightfully so. C is a Systems Programming language, (not
recommended for application programming) where the limitations of other
language are really there to protect the non-Systems Programmer from
him/her self.  Using C (Not C++) you do not have limitations, or you are
only limited by your own imagination. Saying C does not support some
specific syntax is ridiculous, when it is the C code written first that
allows another languages to have the syntax that they do have. Saying C
does not support nested functions is like saying that this dang binary
code does not support nested functions.

The OPP syntax and terminology is implemented by the underlying C code
that was used to develop OOP in the first place. For example JavaScript,
everything in JavaScript is an Object, JavaScript functions are Objects
and they are allowed to be nested. The JavaScript Object is nothing more
than a C struct containing pointers to memory where you'll find machine
instructions and data. This is because the underlaying VM was written in
C. Same example applies to C++, Java, C#, and many others. I don't know,
some may argue that the Java VM was re-written in pure Java, but then
you get into the old chicken and egg paradox, and when the debates come
to an end it is Standard ANSI C (not to be confused with C++ or C#) that
is the root of all popular languages and operating systems in use today,
and rightfully so, as of today it is the best tool for the job.

I still see Cobol as one of the best Application Programming languages
ever. Also I believe that GNU Cobol closely tied to C, with 2.0
function-id, that we'll be able to emulate OOP. Additionally objects (
OBJECT-ID, with the syntax of INVOKE, NEW, and so fourth ) could be
implemented without the requirement of C++, by making use of the ANSI C
code that was written/used to implement OPP in C++. And as always,
depending on how you position all the smoke and mirrors, I could be
completely wrong, or not!

Respectfully,
Mike.

HI Mike

Yes C has unlimited power but so does assembly, there are reasons to write in higher level languages, namely productivity.

Using a language that has features already built in is a short cut to be more productive.

I did say that I was just hoping to have a theoretical chat and that I was not saying we had to change anything. Calling my comments ridiculous isn't very chatty

-Patrick











reply via email to

[Prev in Thread] Current Thread [Next in Thread]