Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GROUP! as new default term for PAREN! #206

Merged
merged 1 commit into from
Dec 30, 2015
Merged

GROUP! as new default term for PAREN! #206

merged 1 commit into from
Dec 30, 2015

Commits on Dec 30, 2015

  1. GROUP! as new default term for PAREN!

    This changes the convention for Ren-C to use the name GROUP internally
    such that the macros are IS_GROUP() instead of IS_PAREN(), REB_GROUP
    instead of REB_PAREN, etc.  PAREN!, PAREN?, and TO-PAREN are kept
    as synonyms in the mezzanine, and a legacy switch to get TO-WORD
    of the datatype to say "PAREN!" is also included.
    
    (Long term the hope is to deprecate TO-WORD on datatypes, to eliminate
    their keyword form and use exemplars, along the lines of #[()] for
    a GROUP!/PAREN! so the word doesn't matter.)
    
    Making this change and type renames less of an issue in Ren-C is the
    new behavior of switch.  Previous concern over what name a type had
    was often driven by switch statements, where a switch on TYPE?/WORD
    could only have one answer regardless of what the alias one used was.
    With TYPE-OF no longer offering a word and switch being able to
    fetch values with get-words, the answer is better:
    
        switch/all type-of quote (a b c) [
            :paren! [print "This should work fine."]
            :group! [print "So will this."]
    
            paren! group! [
                print "**Neither** of these would work."
                print "You must compare to a datatype!"
            ]
        ]
    hostilefork committed Dec 30, 2015
    Configuration menu
    Copy the full SHA
    c78d5a2 View commit details
    Browse the repository at this point in the history