Hi Everyone
It looks like my post "how does our community work" will go
unanswered. It's not a big deal, it's just that I am not sure how to
handle myself in the community sometimes. I want to post about
something that might upset some people. Please everyone forgive me if
I don't write this just the right way, it's hard to get it just right.
So as everyone can see I am still asking beginner/intermediate
questions with Cobol itself. I would like to contribute to the source
code of open Cobol but I will need some time before I am competent to
do so. I have printed most of the source code in colour and I am
reading through it when I can. It's very well laid out and my main
problem is just trying to understand all of the volume of it.
A couple of years ago I tried to read the source code of Lua. Even
though it is only 18K lines of code, I failed miserably.
I am not young, I am 37, have two kids, Wife, mini-van, mortgage and
small business. However there are many people on this list that have
been coding in Cobol longer then I have been alive.
I don't have much to offer the community outside of enthusiasm but
one thing that I mighty be able to offer is a specific perspective.
I have only been programming for 8 years, part time. In this time I
have learned or tinkered with over 20 languages. I really love Cobol
but it was not until I had enough experience under my belt with other
languages that I had the confidence to ignore what so many people
were saying or accidental implying and give the language a real try.
For those with 40 years experience this might not apply.
One thing that chased me away for a few years was the enormous number
of reserved words.
In this video:
http://www.youtube.com/watch?v=7VcArS4Wpqk
Rob Pike, one of the Google Go language developers said that Go has
only 30 reserved words(or thereabouts) and that the number of
reserved words is roughly proportional to the complexity of the
language. With Cobol weighing in with about 300-400 reserved words, I
thought this must be some sort of whacked language from the past.
It's my understanding that there are more lines of Cobol written then
all other languages combined or at least this was the case fairly
recently. However when I look around there is hardly any presence of
it on the internet. Very few tutorials, very few bindings, little
mailing list and IRC activity . Furthermore the forums seem like
ghost towns and are riddled with trolls and such.
I bought 8 books on object oriented Cobol programming. I thought they
would have the "latest and greatest" examples and best practices. I
thought that once I was up to speed I might be able to help bring the
project up to the 2002 standard. I have tried to read these books but
I just end up skimming and putting them down again. I don't see much
of any value that 2002 OO brings and worse it does not seem to have
been adopted in a universal way and that Cobols' public relations
failure was well under way by the time OO showed up.
These additions could give a mechanism to generate library code and
ought to make me more productive with "advances". The things is, the
more I want from the language, the more I just end up finding it in
Cobol 85.
It seem to me that Cobol 85 is near OO already and is already a damn
good language. The thing is that it was been hard for me to learn
coming from experience with many other "modern" languages.
This has been a terribly long introduction but here is the
potentially useful part......
What if I modified open Cobol to make it's goodness more accessible
to programmers familiar with "modern" languages.
I am really loving sub-programs now. I now understand IS COMMON and
IS GLOBAL. It's perfectly sensible to name them these names and have
a more restricted scope as the unspoken default but it would have
been so much easier for me to understand these concepts if the
reserved words were IS PUBLIC or IS PRIVATE.
What is I modified open Cobol and made a friendly fork call Libre
Cobol? If I synchronized it with open Cobol, could I freeload on the
open Cobol list for advice?
I am thinking that a way to make the language more approachable for
some people would be to add non-standard extensions to the language
but add as little total code as possible.
One of my first ideas was to make IS PRIVATE a reserved word that
does nothing, it's just the default. This would be similar to USAGE
IS DISPLAY. I was thinking that if I made IS PUBLIC a synonym of IS
COMMON, new people would know what it does right away.
I was thinking of creating an OO system that was just slightly more
then what it already is in Cobol 85. For instance many languages have
OO without classes, Lua, JavaScript, IO and even Ada(in a non
prototypical way). Information hiding can be achieved in Cobol 85 and
these other languages by including programs/functions/procedures
within other programs/functions/procedures. Most of these languages
have reserved words to assist in defining scope as well.
There languages have more powerful module capabilities then we do and
better ways to bring in library code so that it can be accessed
through a clear dot notation( dog.bark() ). We don't have this but I
was also daydreaming about an enhanced COPY statement that would
bring in multiple sub-programs. For instance COPY
"ls ./dogLib/dog*" . The enhanced copy statement would bring in
everything that a shell command returned. The new files(s) brought in
would still have to be able to access files back in their old
directory that were included as regular COPY statements, it might
give a better library mechanism then just plain COPY.
Very long email..... but"
1)is anyone opposed to a friendly fork?
2)is "IS GLOBAL", the default setting and "IS COMMON" close enough to
what people would expect from "IS PUBLIC", "IS PRIVATE" ?
3)would asking people to prefix their library name files with the
library name "dog-bark.cob" be almost as good as using a dot notation?
Any general comments would be appreciated.
Thanks for reading my very long email-Patrick
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
open-cobol-list mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/open-cobol-list