I imagine you can use a combination of:
*Deferred for Future Discussion*:
https://github.com/apple/swift-evolution#deferred-for-future-discussion
*Accepted proposals which do not have a complete implementation:*
Feel free to convince the core team to add such a list. ;)
--
Adrian Zubarev
Sent with Airmail
Am 1. Juni 2016 um 19:17:25, Vladimir.S (sva...@gmail.com) schrieb:
Do we have any 'feature' to not just throw away of proposals(and then scan
mail list and remember), but put them in queue of
Do we have any 'feature' to not just throw away of proposals(and then scan
mail list and remember), but put them in queue of proposals that should be
reviewed after Swift 3 is released?
Probably some list of such proposals on site, don't know. So I believe any
proposal that would be raised
Given that Swift 3 is winding down, we are in a mode of declining PRs for
proposals that don’t align with its goals. Please bring this back up for
discussion this fall, thanks for understanding.
Closed by Chris. Sad but we’ll have to wait a little longer for this change.
--
Adrian Zubarev
+1
`return` in guards should stay, because there one has to use either `return`,
`continue` or `break`. It would be ugly and inconsistent if one of these could
be left out.
-Thorsten
> Am 31.05.2016 um 20:16 schrieb Vladimir.S via swift-evolution
> :
>
> I really
I added the example I posted in my last reply and submitted a pull request.
--
Adrian Zubarev
Sent with Airmail
___
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution
On 31.05.2016 22:42, Leonardo Pessoa via swift-evolution wrote:
I'd actually like to see a change in guard so that I don't need those
braces. I'd like something more readable like
| guard cond1 or return nil
| guard cond2 or throw MyError.IllegalValue
| guard cond3 or do { ... }
I
I apologize for the tons of typos I make. :/
--
Adrian Zubarev
Sent with Airmail
Am 31. Mai 2016 um 21:55:53, Adrian Zubarev (adrian.zuba...@devandartist.com)
schrieb:
I'd actually like to see a change in guard so that I don't need those
braces. I'd like something more readable like
|
I'd actually like to see a change in guard so that I don't need those
braces. I'd like something more readable like
| guard cond1 or return nil
| guard cond2 or throw MyError.IllegalValue
| guard cond3 or do { ... }
It may add more cases for the compiler to handle but in all cases I
used
> On May 31, 2016, at 2:36 PM, Adrian Zubarev via swift-evolution
> wrote:
>
>> Exactly. You are allowed to omit `return` if the entire body only consists
>> of `return some().expression`
>
> Thats where the useless example comes in (but we don’t need this
Exactly. You are allowed to omit `return` if the entire body only consists of
`return some().expression`
Thats where the useless example comes in (but we don’t need this behavior at
all):
func foo(boolean: Bool) {
guard boolean else {}
print("true“)
}
I made some changes to the
> On May 31, 2016, at 8:45 PM, Adrian Zubarev via swift-evolution
> wrote:
>
> I feel like return is very important part of guard statement. I understand
> the requirement for consistency with properties/closures/functions, but I’ll
> prefer to have some
> On May 31, 2016, at 2:13 PM, Adrian Zubarev via swift-evolution
> wrote:
>
>> Please remove the section on guard as any of the preceding will never have
>> single expression top level code blocks if they contain a guard clause.
>
> I didn’t get this at first but
Please remove the section on guard as any of the preceding will never have
single expression top level code blocks if they contain a guard clause.
I didn’t get this at first but now I see your point, it’s because the whole
returning scope will need `return` at the very end so `guard` should
> On May 31, 2016, at 1:59 PM, Adrian Zubarev via swift-evolution
> wrote:
>
>> +1. This is example *is not* a single expression code block. There are 3
>> expressions (the condition, the return value in the else block, and the
>> primary return value).
>
> The
> On May 31, 2016, at 12:35 PM, Adrian Zubarev via swift-evolution
> wrote:
>
> Here is the draft proposal:
> https://github.com/DevAndArtist/swift-evolution/blob/single_expression_optional_return/proposals/-single-expression-optional-return.md
>
>
+1. This is example *is not* a single expression code block. There are 3
expressions (the condition, the return value in the else block, and the primary
return value).
The `else` block is a returning single expression block. I can’t show the
`guard` example without any returning scope.
You
> On May 31, 2016, at 1:16 PM, Vladimir.S via swift-evolution
> wrote:
>
> I really like the proposal in case of properties and functions, but I really
> don't want to have
> guard boolean else { "false” }
+1. This is example *is not* a single expression code
I really like the proposal in case of properties and functions, but I
really don't want to have
guard boolean else { "false" }
I feel like `return` is very important part of `guard` statement.
I understand the requirement for consistency with
properties/closures/functions, but I'll prefer to
I feel like return is very important part of guard statement. I understand the
requirement for consistency with properties/closures/functions, but I’ll prefer
to have some inconsistency in language in this case and require return for
guard. And in case I’ll have to choose all-or-nothig, I’ll
I really like the proposal in case of properties and functions, but I
really don't want to have
guard boolean else { "false" }
I feel like `return` is very important part of `guard` statement.
I understand the requirement for consistency with
properties/closures/functions, but I'll prefer to
I'd interpret that as being able to write:
var x: Int8 { 20 }
as opposed to:
var x: Int8 { Int8(20) }
- Dave Sweeris
> On May 31, 2016, at 12:47, David Rönnqvist via swift-evolution
> wrote:
>
> Under "Proposed solution" you say (emphasis mine):
>
> "Make return
Under "Proposed solution" you say (emphasis mine):
"Make return optional and infer return type for single-expressions everywhere
in the language:"
However the return type isn't inferred for computed properties or functions,
and I don't see type inference being discussed in the proposal (other
Here is the draft proposal:
https://github.com/DevAndArtist/swift-evolution/blob/single_expression_optional_return/proposals/-single-expression-optional-return.md
Did I covered everything case? If you find some mistakes feel free to provide
feedback so I can fix the proposal before I submit
+1
L
On 31 May 2016 at 12:47, Matthew Johnson via swift-evolution
wrote:
>
>> On May 28, 2016, at 3:09 AM, David Hart via swift-evolution
>> wrote:
>>
>> It isn’t a special case because all other single-statement closures in the
>>
> On May 28, 2016, at 3:09 AM, David Hart via swift-evolution
> wrote:
>
> It isn’t a special case because all other single-statement closures in the
> language work that way. It’s actually inconsistent now.
Computed properties aren’t closures so it’s not
It isn’t a special case because all other single-statement closures in the
language work that way. It’s actually inconsistent now.
> On 28 May 2016, at 09:03, Brian Christensen via swift-evolution
> wrote:
>
> On May 27, 2016, at 13:57, Adrian Zubarev via
I’m a +1 to this, this is something that keeps catching me out as I’m so used
to omitting return in other closures, and that’s essentially all a computer
property is anyway so it makes sense for the behaviour to be consistent.
> On 27 May 2016, at 18:57, Adrian Zubarev via swift-evolution
>
I'll write a small proposal tomorrow for that behavior (not only for computed
properties of course)! Today I'm too busy.
Thank you for your positive feedback.
--
Adrian Zubarev
Sent with Airmail
Am 28. Mai 2016 um 10:11:26, David Hart
(da...@hartbit.com(mailto:da...@hartbit.com))
It isn’t a special case because all other single-statement closures in the
language work that way. It’s actually inconsistent now.
> On 28 May 2016, at 09:03, Brian Christensen via swift-evolution
> wrote:
>
> On May 27, 2016, at 13:57, Adrian Zubarev via
+1. This has always tripped me up, I guess I felt there was a good reason for
requiring you to add a `return`, but not sure what it would be.
> On 28 May 2016, at 3:57 AM, Adrian Zubarev via swift-evolution
> wrote:
>
> The idea is simple:
>
> Can we make return
On May 27, 2016, at 13:57, Adrian Zubarev via swift-evolution
wrote:
> The idea is simple:
>
> • Can we make return keyword optional in cases like this?
> • Shouldn’t this behave like @autoclosure or @noescape?
> type A {
> var characters: [Character]
+ 1 from me as well for the already stated reasons.
- Dennis
> On May 28, 2016, at 2:15 AM, Matthew Johnson via swift-evolution
> wrote:
>
>
>
> Sent from my iPad
>
> On May 27, 2016, at 6:15 PM, Brent Royal-Gordon via swift-evolution
>
Sent from my iPad
On May 27, 2016, at 6:15 PM, Brent Royal-Gordon via swift-evolution
wrote:
>> The idea is simple:
>>
>>• Can we make return keyword optional in cases like this?
>>• Shouldn’t this behave like @autoclosure or @noescape?
>
> This actually
+1. Completely agree with Brent's views here.
On 28 May 2016, at 9:15 AM, Brent Royal-Gordon via swift-evolution
wrote:
>> The idea is simple:
>>
>>• Can we make return keyword optional in cases like this?
>>• Shouldn’t this behave like @autoclosure or
> The idea is simple:
>
> • Can we make return keyword optional in cases like this?
> • Shouldn’t this behave like @autoclosure or @noescape?
This actually doesn't have anything to do with @autoclosure or @noescape. Any
one-expression closure can omit the `return` statement and have
The idea is simple:
Can we make return keyword optional in cases like this?
Shouldn’t this behave like @autoclosure or @noescape?
type A {
var characters: [Character] = …
var string: String { String(self.characters) }
var count: Int { 42 }
}
Is this worth a proposal or Swifty enough,
37 matches
Mail list logo