[bitc-dev] Syntax Poll: Scoping Syntax
Jonathan S. Shapiro
shap at eros-os.com
Thu Mar 5 12:59:16 EST 2009
Because definitions are not expressions, I think they want to start
with a keyword.
On Thu, Mar 5, 2009 at 12:56 PM, Geoffrey Irving <irving at naml.us> wrote:
> On Thu, Mar 5, 2009 at 9:49 AM, Jonathan S. Shapiro <shap at eros-os.com> wrote:
>> On Thu, Mar 5, 2009 at 12:40 PM, Geoffrey Irving <irving at naml.us> wrote:
>>> What would be the syntax for appending a definition to the current scope?
>>
>> It's mainly a keyword distinction, I think. In BitC, for example, all
>> type definitions append to current top level scope (restricted to top
>> level). DEFINE appends to current scope, and LET introduces and
>> encloses a nested scope.
>>
>> The difference is mainly one of keyword selection (perhaps "def" vs.
>> "let"). I'm hopefully that we can normalize the two forms a bit as we
>> re-syntax.
>
> Actually, do we need a keyword for adding a variable to the current
> scope at all? I.e., what about
>
> x = 3;
>
> The obvious problem with this is that it overlaps with assignment,
> which might make it a non-starter. That said, if I had to make I
> choice I'd prefer to make assignment more verbose (and more visually
> obvious) than creating a new variable.
>
> Geoffrey
> _______________________________________________
> bitc-dev mailing list
> bitc-dev at coyotos.org
> http://www.coyotos.org/mailman/listinfo/bitc-dev
>
>
More information about the bitc-dev
mailing list