begin quoting Chuck Esterbrook as of Wed, Jan 02, 2008 at 02:22:29PM -0800:
> 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.
It's not fear, it's wisdom.
And I've been finding a stronger correlation between preferred brace
styles and acceptance of indentation-as-whitespace.
Folks who don't mind:
if (expression)
{
code
}
or
if (expression)
{
code
}
Mostly seem to have no (or little) objection to indentation-as-syntax.
Folks who prefer
if (expression) {
code
}
or
if (expression)
{
code
}
Mostly seem to object to indentation-as-syntax.
I'm suspecting it's a world-view thing. We're not all wired the same.
(What I don't get are the people who do:
if (expression) {
code
}
or
if (expression) {
code
}
...which seems the worst of all worlds.)
> 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.
Well, inflicting C++ on someone should be against the geneva convention
or something.
What I've found hard is trying to explain scoping to people who's first
language was Python. "No, you _can't_ refer to that variable here, it's
out of scope!" "But it's at the same indentation level!"
> > > 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.
Then you should go with 8 spaces. If you're going to normalize things,
then normalize 'em to the, well, normal definition, no?
> > 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.
No, it wasn't.
It wasn't a simple <pre>...</pre> block -- it was some sort of CSS
monster with div and span tags everywhere. All hail the new Web!
> > 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.
And I've never been able to read python. I can puzzle my way through
many (real) languages, but in python, the scoping is impossible to keep
track of.
As I said above... people aren't all wired the same.
> Google, Yahoo and other companies have done serious work with Python.
Yes. They also think that running untrusted, unmediated code on your
system is a good idea. Pardon me if I don't drink the kool-aide that
whatever google or yahoo does is a good idea.
"$X uses $Y, therefore $Y must be a good idea" is how we get people
writing applications in C, or using C++ at all, or using the Win32 APIs.
> 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.
Python will always be a toy language.
It's just being seriously abused.
--
Don't mind these opinions of mine;
You're just wrong, that's my line.
Stewart Stremler
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg