begin quoting Chuck Esterbrook as of Wed, Jan 02, 2008 at 01:00:25PM -0800:
> On Jan 2, 2008 11:22 AM, John H. Robinson, IV <[EMAIL PROTECTED]> wrote:
> > Chuck Esterbrook wrote:
> > >
> > > I've created a programming language that could be described as a cross
> > > between Python, Eiffel, Objective-C and C#. It runs on Linux, Mac and
> > > Windows via Novell Mono or MS .NET.
No Solaris?
Hm.
How is it like Objective-C?
> > Does it support # style comments, so we can begin with
> > #!/usr/bin/cobra
> > ?
>
> Yes. I'm a Unix-like command line junkie.
>
> > On a personal note, COBOL-like whitespace significance is enough to turn
> > me off of a language that any other problem it has will prevent me from
> > using it.
>
> I'm not familiar with COBOL's whitespace rules. I doubt they're identical.
They're not. The point is that COBOL treated indentation as syntax.
ForTran also had indentation rules. For awhile.
Tracking down errors due to indentation errors is HARD. That's why so
many languages did away with such rules.
> Cobra simply requires that you indent blocks with one tab or 4 spaces.
I prefer 3 spaces, personally.
> Every professional programmer I know indents his code. And every
> newbie programmer who writes this:
>
> if (something) {
> foo();
> bar();
> }
>
> ...gets schooled as soon as someone sees his code.
Which is one of the reasons for the language not to enforce it. It's not
just "oh, indentation is good" -- and if that's the extent of the schooling,
then the schooler needs to be schooled -- it's "your code should be written
to be read by someone else".
Plus, redundancy isn't bad in an of itself. It's _excessive_ redundancy
that is the problem, and the big hint there is with the term "excessive".
Anything that can be described as "excessive" is probably not a good thing,
and this applies to the excessive elimination of redundancy. Some redundancy
is *good*.
I recently had a one-off task, and the most promising solution from
google was a python script. It was a couple of pages long, so I didn't
want to transcribe it, but hey, I have a computer with a GUI, so I cut
and pasted from the web-page to a file.
The indentation was not preserved with the paste. All leading spaces
were lost. The script was useless, because there was no way to recreate
the appropriate indentation without (effectively) transcribing the script.
This is the fundamental problem with indentation-as-syntax: stuff WILL
get reformatted.
I might be able to accept the _mandating_ of consistent indentation, but
a language that eliminates delimiters and uses indentation to indicate
syntax has too many practical problems to be anything other than a "toy
language" in my book. Just because you /can/ build a desk out of legos
doesn't make legos any less of a toy, nor does it make lego-desks a good
idea for the general public...
> > I noticed that the POSIX ``compiler'' just creates a mono object. What
> > it the benefit of using the mono object, instead of calling the cobra
> > interpreter directly?
>
> mono is just a command line tool that runs .exe's made for the
> .NET/Mono VM which is what comes out of Cobra. It's just a wee bit
> faster when you already have the .exe.
What is a ".exe" on a *nix box anyway?
It can't mean "executable program", as we already have a term for that....
> You can say "cobra myprog.cobra" and forget about the mono "shortcut"
> and "exe" if you prefer. Some people think like that. Other people
> think about compilation and .exe's. Cobra can operate in both modes.
So you use ".exe" as a suffix for the precompiled bytecodes?
--
In my vim editor, I can end a line with brace and enter
And for free, get the closing brace with cursor in the center.
Stewart Stremler
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg