[Grace-core] Putative Blog Posts

James Noble kjx at ecs.vuw.ac.nz
Thu Nov 4 00:39:22 PDT 2010


> I went though and edited the first Blog post (on the wiki), on  
> blocks.  I think that it's fine, with one exception.

great...

> That's the  note about comments.  It ignores the discussion that we  
> had about attaching comments to specific syntactic constructs,  
> rather than making them whitespace.

opps. yes you're right.

> I really don't want to have to come up with complex rules for  
> deciding which construct a  || (which is more graceful than //)  
> comment applies to.  I want to apply my comments with a programming  
> environment.

You know I'm sure I saw another discussion of that somewhere -
I think in the context of Smalltalk - ahh yes, Newspeak spec?

>> Our general approach is to treat ordinary comments as metadata as  
>> well.
>> That way, they are attached to a known place in the program and are  
>> not thrown
>> away, so they can be preserved during refactoring.

so your note could mention that...

anyway: I actually think that's quite uncontroversial, and
imposes no constraint on the comment design, actually...
(I remember thinking about this but can't remember why
I thought this was basically for free :-)

> I suppose that we need to do a few things.  I need to write a blog  
> post on comments.   And we need to decide if a comment syntax is  
> really necessary, and if so, what it looks like.

yes and yes.  I'm afraid a comment syntax *is* necessary, for  
publications,
for textbooks, and for sending code via email - and we need to have one
(or a few) consistent syntaxen for it.

but you should start a note - if you're prefer the comment sections not
to go into this blog post, then start a new one & copy them there.

BTW I *love* this line:
> We all know that syntax is unimportant — in theory. However, it is  
> quite important in practice, because we all have our pet loves and  
> hates. Moreover, to even discuss competing ideas for the more  
> substantive parts of the language, we need a syntax. So, let's start  
> by talking about it
>

it's just great

> Kim Comments: I'm slightly uncomfortable by having different  
> semantics of blocks depending on whether or not they are at the top  
> level. On the other hand, it gives you the right behavior
>
yep. Fraid so. "top level" is probably a slight misnomer, blocks can  
be nested etc.
what they *can't* be is in an argument position - top level of a  
statement list.

do you want to say anything else about that?

Andrew (I think) pointed out that Algol-68 had the same rule, but in a  
statically
typed language it gets a nice name related to the type system.
(looks again, yep its already in the note)
In a potentially dynamically typed language we only have syntatic  
context
so although we have the same rule, and the description is *simpler* -  
it sounds uglier.
(arguably because CS discourse has  ignored these kinds of languages)
but I think it is the Right Thing.

J


More information about the Grace-core mailing list