Details

    • Type: Wish Wish
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.1
    • Component/s: Compiler, Parser
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Feature complete with code literals, splicing and the 'macro' macro.

      macro performTransaction:
          args = performTransaction.Arguments
          return [|
              _transaction = $(args[0]).BeginTransaction()
              try:
                  $(performTransaction.Block)
                  _transaction.Commit()
              except:
                  _transaction.Revert()
                  raise
              ensure:
                  _transaction.End()
          |]
      

        Activity

        Hide
        Alex Peake added a comment -

        Have you looked at the implementation in Nemerele?

        Show
        Alex Peake added a comment - Have you looked at the implementation in Nemerele?
        Hide
        Sorin Ionescu added a comment -

        Personally, I like the way macros are written now. While they are a
        little harder to write, they are easier to read. Plus, the more
        easier macros is to create, the more they will be abused. I've seen
        C++ code that does not look like C++ anymore due to macro abuse.

        Show
        Sorin Ionescu added a comment - Personally, I like the way macros are written now. While they are a little harder to write, they are easier to read. Plus, the more easier macros is to create, the more they will be abused. I've seen C++ code that does not look like C++ anymore due to macro abuse.
        Hide
        dennis peterson added a comment -

        I don't think a feature should be harder than necessary, just to keep people from using it ...for a counterexample, look at Lisp (and Scheme), where macros are used almost as much as functions, and everything works out great.

        Show
        dennis peterson added a comment - I don't think a feature should be harder than necessary, just to keep people from using it ...for a counterexample, look at Lisp (and Scheme), where macros are used almost as much as functions, and everything works out great.

          People

          • Assignee:
            Rodrigo B. de Oliveira
            Reporter:
            Rodrigo B. de Oliveira
          • Votes:
            4 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: