Uploaded image for project: 'Swift'
  1. Swift
  2. SR-569

Create a Swift Internals Manual

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler
    • Labels:

      Description

      Clang has the Internals manual, and swiftc should have something similar. Particularly, I'm very interested in the following case being documented. Once it is, I feel like people would be better able to understand the compiler and add to it.

      Let's say I have a type called SuperInt that has some cool integer operations that would be applicable and useful to everyone writing Swift. It's a given that this makes sense to be in the Swift language, and people are going to be using it so often that it makes sense to create a new literal syntax for this type. I'd like users to be able to instantiate a SuperInt with the following:

      let superIntExample = %^100^%
      

      Crazy syntax for a crazy example, but I wanted to make sure it's not something that's already in Swift. In this example, my SuperInt would be instantiated with a value of 100.

      I'd like to know the parts of the Swift compiler I would need to understand and change to implement this new type with its new syntax.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            sethfri Seth Friedman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: