[Accepted] SE-0034 - Disambiguating Line Control Statements from Debugging Identifiers

Proposal Link: swift-evolution/0031-adjusting-inout-declarations.md at master · apple/swift-evolution · GitHub

The review of SE-0034 "Disambiguating Line Control Statements from Debugging Identifiers" ran from Feb 17…22, 2016. The proposal has been *accepted*:

The community and core team both widely agree that this is a straight-forward fix to an uncommonly used feature.

Thank you to Erica Sadun for driving this forward. If someone is interested in a starter project, this would be a great one to tackle. I filed [SR-840] Implement support for SE-0034 -> Renaming #line directive to #setline · Issue #43452 · apple/swift · GitHub to track this.

-Chris Lattner
Review Manager

Proposal Link:

This is the correct link:

-Chris

···

On Feb 27, 2016, at 10:20 PM, Chris Lattner <clattner@apple.com> wrote:

The review of SE-0034 "Disambiguating Line Control Statements from Debugging Identifiers" ran from Feb 17…22, 2016. The proposal has been *accepted*:

The community and core team both widely agree that this is a straight-forward fix to an uncommonly used feature.

Thank you to Erica Sadun for driving this forward. If someone is interested in a starter project, this would be a great one to tackle. I filed [SR-840] Implement support for SE-0034 -> Renaming #line directive to #setline · Issue #43452 · apple/swift · GitHub to track this.

-Chris Lattner
Review Manager
_______________________________________________
swift-evolution-announce mailing list
swift-evolution-announce@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution-announce

Per discussion with the Core Team (driven by SE-0039), this proposal has been revised to align with a broader and more consistent consistent naming scheme. Specifically, we prefer identifiers in the # namespace to use lower-camel case, and to follow the syntax of a primary declaration, statement, or expression from the base language wherever possible.

In the case of SE-0034, instead of the formerly accepted:

  #setline 42 “foo” // Set logical position.
  #setline // Reset logical position.

SE-0034 now specifies a syntax of:

  #sourceLocation(file: "foo", line: 42) // Set logical position.
  #sourceLocation() // Reset logical position.

This provides syntax that looks like an imperative function call that affects the logical source location at that point in the file.

Given that this feature is not a widely visible end-user feature and that the core team had agreement on this point, we’re taking the unusual step of just amending an already accepted proposal (in an effort to reduce unnecessary process overhead). However, if you have any concerns about this, please bring them up on swift-evolution.

Thanks,

-Chris

···

On Feb 27, 2016, at 10:20 PM, Chris Lattner <clattner@apple.com> wrote:

Proposal Link: https://github.com/apple/swift-evolution/blob/master/proposals/0034-disambiguating-line.md

The review of SE-0034 "Disambiguating Line Control Statements from Debugging Identifiers" ran from Feb 17…22, 2016. The proposal has been *accepted*:

The community and core team both widely agree that this is a straight-forward fix to an uncommonly used feature.

Thank you to Erica Sadun for driving this forward. If someone is interested in a starter project, this would be a great one to tackle. I filed [SR-840] Implement support for SE-0034 -> Renaming #line directive to #setline · Issue #43452 · apple/swift · GitHub to track this.

-Chris Lattner
Review Manager

FWIW, to me it looks like a declarative statement about how the compiler
should treat the following lines of source. A name beginning with "set"
would be more imperative, IMO. I like declarative better.

···

on Fri Mar 11 2016, Chris Lattner <swift-evolution@swift.org> wrote:

This provides syntax that looks like an imperative function call that
affects the logical source location at that point in the file.

--
-Dave

Alternatives:

#openVirtualFile(...)
#closeVirtualFile(...)

#pragma openVirtualFile(...)
#pragma closeVirtualFile(...)

if openVirtualFile(...)
#endif

Reference:

`Parser::parseLineDirective`
<https://github.com/apple/swift/blob/master/lib/Parse/ParseDecl.cpp#L2618&gt;

-- Ben

···

On 14 Mar 2016, at 22:30, Dave Abrahams via swift-evolution <swift-evolution@swift.org> wrote:

on Fri Mar 11 2016, Chris Lattner <swift-evolution@swift.org> wrote:

This provides syntax that looks like an imperative function call that
affects the logical source location at that point in the file.

FWIW, to me it looks like a declarative statement about how the compiler
should treat the following lines of source. A name beginning with "set"
would be more imperative, IMO. I like declarative better.

I think maybe my posting wasn't clear. I'm not looking for alternatives, FWIW. I like the resolution *because* it looks declarative to me.

···

On Mar 15, 2016, at 2:29 AM, Ben Rimmington <me@benrimmington.com> wrote:

On 14 Mar 2016, at 22:30, Dave Abrahams via swift-evolution <swift-evolution@swift.org> wrote:

on Fri Mar 11 2016, Chris Lattner <swift-evolution@swift.org> wrote:

This provides syntax that looks like an imperative function call that
affects the logical source location at that point in the file.

FWIW, to me it looks like a declarative statement about how the compiler
should treat the following lines of source. A name beginning with "set"
would be more imperative, IMO. I like declarative better.

Alternatives:

#openVirtualFile(...)
#closeVirtualFile(...)

#pragma openVirtualFile(...)
#pragma closeVirtualFile(...)

if openVirtualFile(...)
#endif

Reference:

`Parser::parseLineDirective`
<https://github.com/apple/swift/blob/master/lib/Parse/ParseDecl.cpp#L2618&gt;

-- Ben