On Jan 2, 2008 1:59 PM, SJS <[EMAIL PROTECTED]> wrote:
> 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.

I don't have access to Solaris so I can't say, but Novell Mono has a
download for Solaris and you could try it and let me know.

> How is it like Objective-C?

Obj-C has static types *and* the "id" type which is dynamic--you can
send any message you want to an "id" without getting any warnings or
error messages. At run-time the message send will succeed or fail due
to not being found.

Same in Cobra except the type is called "dynamic" and its also the
default type for arguments if you don't specify a type.

Also Cobra's "interface" feature is similar to Obj-C's @protocol.

Finally, Cobra will be support class extensions in the future which
are @category's in Obj-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.

My experience in talking to people is that folks who have used Python
know how straightforward and safe indentation-for-blocks is while
former Cobol and Fortran users fear the whitespace due to false
associations between indentation-for-blocks and the various problems
that those languages had.

At a high level of abstraction, it reminds me of when I meet a non-IT
person, say someone in physics, who has learned C++ after several
years of effort, and they now refuse to learn any more languages. You
just can't convince them that it won't be so hard next time.

> > Cobra simply requires that you indent blocks with one tab or 4 spaces.
>
> I prefer 3 spaces, personally.

Cobra is somewhat disrespectful of such preferences in favor of the
"syntax normalization" described earlier. I realize that will be a
turn off for some, but I think the goal is worth it.

> 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.

This is easy to solve by choosing File > Save As... and then pulling
the content out of the file.

> 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'm sure Cobol and Fortran do have practical problems with their funky
whitespace rule. But I'm also sure that simple indentation-for-blocks
does not. I know. I've cranked out mounds of Python code on the job.

Google, Yahoo and other companies have done serious work with Python.
And although plagued by performance problems, lack of optional static
typing and lack of contracts ( ;-) ) Python is not a toy language nor
has indentation-for-blocks caused them headaches. Well except when you
get a file that mixes tabs and spaces, hence Cobra outlaws that.

> > > 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?

A binary file containing byte code for the VM.

...
> So you use ".exe" as a suffix for the precompiled bytecodes?

You got it!


-Chuck

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to