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

[SR-227] Remove C-style for loops #42849

Closed
DougGregor opened this issue Dec 14, 2015 · 11 comments
Closed

[SR-227] Remove C-style for loops #42849

DougGregor opened this issue Dec 14, 2015 · 11 comments
Labels
compiler The Swift compiler in itself task

Comments

@DougGregor
Copy link
Member

Previous ID SR-227
Radar None
Original Reporter @DougGregor
Type Task
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Task
Assignee None
Priority Medium

md5: 92c8cd90815378bcd771384d00bd1b6d

Issue Description:

Per

https://github.com/apple/swift-evolution/blob/master/proposals/0007-remove-c-style-for-loops.md

we should remove C-style for loops from Swift 3.0.

@swift-ci
Copy link
Collaborator

Comment by G Alexander (JIRA)

completely disagree, keep C loops

@swift-ci
Copy link
Collaborator

Comment by Austin C (JIRA)

I've read a lot of the people's reasonings for removing C-style loops, but I entirely disagree. It already works, it is simple, and there really is no need to remove it. It already exists. It is not some complicated mess. If it was broken in some way, sure. There are a lot of programmers in different languages who use this syntax and it makes migration initially easier. It doesn't enter any bugs into the system. It is a fundamental part of the language already that is not broken in any way. No need to break code just because of bunch of expert programmers got together and wanted everyone else to change. I see a lot of challenges on here too "see if anyone can be smart enough to do this in the more Swifty way."

@swift-ci
Copy link
Collaborator

Comment by G Alexander (JIRA)

what he said ^^

@swift-ci
Copy link
Collaborator

Comment by Joe (JIRA)

I agree with austintatious (JIRA User) as well but the fact is the decision has been made, has the backing of "the big names in Swift", and across the board it's being removed in the various repositories. It is amusing to watch the mental contortions as people try to find ways of expressing the basic iteration logic the C-style for loop provides using some other less clear and syntactically painful form. In the end though the language will eject the syntax in version 3.0, so we might as well get with the program and hope that folks had their jollies and don't try to eliminate other useful constructs in the future.

@DougGregor
Copy link
Member Author

Discussions on the evolution of Swift should go on the [swift-evolution mailing list](https://lists.swift.org/mailman/listinfo/swift-evolution). The bug tracker is for tracking bugs, implementation tasks, and so on. Thanks!

@swift-ci
Copy link
Collaborator

Comment by G Alexander (JIRA)

just tell the the last version with C loop and I'll make my own fork.

what discussion? it's just a mailing list?

@DougGregor
Copy link
Member Author

See the [swift-evolution repository](https://github.com/apple/swift-evolution) for more information on the Swift evolution process.

@swift-ci
Copy link
Collaborator

Comment by Michael Jordan (JIRA)

Hello,

I'm new to this board, but certainly not new with my coding skills. I note that this issue is sitting open. Would it be proper to volunteer for something like this, and if so, what would be the procedure?

@swift-ci
Copy link
Collaborator

Comment by Joe (JIRA)

Howdy lxman (JIRA User). I don't believe there is any work to be done here, C-style for loops have already been removed from Swift. I think this ticket should simply be marked Resolved/Closed.

@swift-ci
Copy link
Collaborator

Comment by Michael Jordan (JIRA)

Okay, thanks, I'll keep my eyes open then.

@DougGregor
Copy link
Member Author

This was implemented in Swift 3 quite a while ago.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself task
Projects
None yet
Development

No branches or pull requests

2 participants