> Am 24.11.2017 um 20:13 schrieb Xiaodi Wu via swift-evolution
> :
>
>> On Thu, Nov 23, 2017 at 5:33 PM, Chris Lattner wrote:
>>> On Nov 23, 2017, at 10:35 AM, Xiaodi Wu via swift-evolution
>>> wrote:
>>> This
> 24 Nov. 2017 08:33 Chris Lattner via swift-evolution
> wrote:
>
> 2) I’d like to explore the idea of making // syntax be *patterns* instead of
> simply literals. As a pattern, it should be possible to bind submatches
> directly into variable declarations,
On Sat, Nov 25, 2017 at 12:08 AM, Chris Lattner wrote:
>
>
> On Nov 24, 2017, at 7:52 PM, Xiaodi Wu wrote:
>
> etc. Even if we don’t have a “default regex” for types, it would still be
>> awesome to be able to write:
>>
>>
>> if case /(let name:
> On Nov 24, 2017, at 7:52 PM, Xiaodi Wu wrote:
>
> etc. Even if we don’t have a “default regex” for types, it would still be
> awesome to be able to write:
>
>
> if case /(let name: [a-zA-Z]+) (let count: Int: [0-9]+)/ = getSomeString() {
>print(name, count)
> }
>
On Fri, Nov 24, 2017 at 6:25 PM, Chris Lattner wrote:
>
>
> On Nov 24, 2017, at 4:15 PM, Chris Lattner wrote:
>
>
> than the same type having a collection of named matches using the usual
> Perl syntax?
>
> if case /(?[a-zA-Z]+) (?[a-zA-Z]+)/ =
>
> On Nov 24, 2017, at 4:15 PM, Chris Lattner wrote:
>
>>
>> than the same type having a collection of named matches using the usual Perl
>> syntax?
>>
>> if case /(?[a-zA-Z]+) (?[a-zA-Z]+)/ = getSomeString()
>> {
>> print(Regex.captured["firstName"],
:
On Nov 24, 2017, at 11:12 AM, Xiaodi Wu wrote:
> I think we've circled back to a topic that we've discussed here before. I do
> agree that having more of this validation at compile time would improve the
> experience. However, I can see a few drawbacks to the _compiler_
On Thu, Nov 23, 2017 at 5:33 PM, Chris Lattner wrote:
> On Nov 23, 2017, at 10:35 AM, Xiaodi Wu via swift-evolution <
> swift-evolution@swift.org> wrote:
>
> This proposed addition addresses a known pain point, to be sure, but I
> think it has many implications for the
On Nov 23, 2017, at 10:35 AM, Xiaodi Wu via swift-evolution
wrote:
> This proposed addition addresses a known pain point, to be sure, but I think
> it has many implications for the future direction of the language and I'd
> like to explore them here.
Thanks for
aren’t all literals evaluated at compile time?
On Thu, Nov 23, 2017 at 6:07 PM, Tony Allevato
wrote:
> This could be solved by extending the existing string literal handling and
> letting type inference do the rest. The real problem here is that
> `UInt8(ascii: X)` is
> On Nov 23, 2017, at 3:07 PM, Tony Allevato via swift-evolution
> wrote:
>
> This could be solved by extending the existing string literal handling and
> letting type inference do the rest. The real problem here is that
> `UInt8(ascii: X)` is annoying to write
This could be solved by extending the existing string literal handling and
letting type inference do the rest. The real problem here is that
`UInt8(ascii: X)` is annoying to write when you're dealing with a large
amount of low-level data.
If UInt8 conformed to ExpressibleByUnicodeScalarLiteral,
On Thu, Nov 23, 2017 at 3:47 PM, Tony Allevato via swift-evolution <
swift-evolution@swift.org> wrote:
>
>
> On Thu, Nov 23, 2017 at 12:21 PM Xiaodi Wu via swift-evolution <
> swift-evolution@swift.org> wrote:
>
>> On Thu, Nov 23, 2017 at 2:14 PM, John Holdsworth via swift-evolution <
>>
> On Nov 23, 2017, at 11:10 AM, Brent Royal-Gordon
> wrote:
>
> On Nov 23, 2017, at 11:15 AM, Chris Lattner via swift-evolution
> > wrote:
>
>> Until we figure out that path forward for regex’s, I think
On Thu, Nov 23, 2017 at 2:47 PM, Tony Allevato
wrote:
>
>
> On Thu, Nov 23, 2017 at 12:21 PM Xiaodi Wu via swift-evolution <
> swift-evolution@swift.org> wrote:
>
>> On Thu, Nov 23, 2017 at 2:14 PM, John Holdsworth via swift-evolution <
>> swift-evolution@swift.org>
On Thu, Nov 23, 2017 at 12:21 PM Xiaodi Wu via swift-evolution <
swift-evolution@swift.org> wrote:
> On Thu, Nov 23, 2017 at 2:14 PM, John Holdsworth via swift-evolution <
> swift-evolution@swift.org> wrote:
>
>> I’m beginning to wish I hadn’t tied this proposal so strongly to regular
>>
On Thu, Nov 23, 2017 at 2:14 PM, John Holdsworth via swift-evolution <
swift-evolution@swift.org> wrote:
> I’m beginning to wish I hadn’t tied this proposal so strongly to regular
> expressions!
> It is indeed the wrong motivation. Even as a ten year veteran of Perl
> development
> I’m not sure
I’m beginning to wish I hadn’t tied this proposal so strongly to regular
expressions!
It is indeed the wrong motivation. Even as a ten year veteran of Perl
development
I’m not sure we want to bake it into the language quite so tightly (isn’t a
part of
Foundation?) What would /regex/ represent -
On Thu, Nov 23, 2017 at 1:12 PM, Brent Royal-Gordon via swift-evolution <
swift-evolution@swift.org> wrote:
> On Nov 23, 2017, at 11:15 AM, Chris Lattner via swift-evolution <
> swift-evolution@swift.org> wrote:
>
> Until we figure out that path forward for regex’s, I think they aren’t the
>
I eh, literally just ran into a situation where this feature would have been
super useful:
Someone sent me a JSON string with “\” in it. I needed to plug it into the UI
logic to test something but I had to escape the “\”s again to make
JSONSerialization happy.
A raw string literal syntax,
> On Nov 23, 2017, at 11:15 AM, Chris Lattner via swift-evolution
> wrote:
>
> Until we figure out that path forward for regex’s, I think they aren’t the
> right motivation for this proposal.
1. Even in our shining pattern matching future—a future which I, for one,
This proposed addition addresses a known pain point, to be sure, but I
think it has many implications for the future direction of the language and
I'd like to explore them here.
The tl;dr version is that I'm not sure this is the right direction in which
to head to address the issue of regex
> On Nov 23, 2017, at 9:43 AM, John Holdsworth via swift-evolution
> wrote:
>
> Hello S/E,
>
> I’d like to put forward a perhaps rather banal change to the Swift lexer
> primarily intended to make entering regular expression patterns easier.
>
>
Hello S/E,
I’d like to put forward a perhaps rather banal change to the Swift lexer
primarily intended to make entering regular expression patterns easier.
https://github.com/DoubleSpeak/swift-evolution/blob/master/proposals/-raw-string-escaping.md
24 matches
Mail list logo