[swift-evolution] Fast String Comparison From String Arrays

2017-07-28 Thread Omar Charif via swift-evolution
Hi, I wonder whether there is already a way in Swift to compare a string against a large string array quickly without using the traditional ways of comparison. Say we have ["a", "b", "c", "d"] and we would like to find whether this array contains "a", then we decide to check if we have "b" in

Re: [swift-evolution] Fast String Comparison From String Arrays

2017-07-31 Thread Omar Charif via swift-evolution
8, 2017, at 1:57 PM, Huon Wilson via swift-evolution >> mailto:swift-evolution@swift.org>> wrote: >> >> >>> On Jul 28, 2017, at 05:54, Omar Charif via swift-evolution >>> mailto:swift-evolution@swift.org>> wrote: >>> >>> Hi, >>&

[swift-evolution] Extensions

2017-07-31 Thread Omar Charif via swift-evolution
I am a big fan of extensions, but I wonder what would happen years from now when we start to have lots of extensions created for the primitive classes. The problem is that we can write a String extension for example in any swift file in the project, the name of the file has nothing to do with th

Re: [swift-evolution] Fast String Comparison From String Arrays

2017-08-01 Thread Omar Charif via swift-evolution
orithm, including > space/time complexity? It sounds interesting, but I am having trouble > finding the relevant portions in the source code... > > Thanks, > Jon > >> On Jul 31, 2017, at 1:26 AM, Omar Charif via swift-evolution >> mailto:swift-evolution@swift.org>&g

Re: [swift-evolution] Draft: Regular Expression in Swift

2017-08-10 Thread Omar Charif via swift-evolution
Hi Joshua, I also feel a huge gap when it comes to string matching, whether it is implementation or performance. I also wrote a library for String matching called StringMap and it has been way for performant than regular expressions. I recently proposed to include it in core foundation but it se

[swift-evolution] Documentation and comments

2017-09-16 Thread Omar Charif via swift-evolution
Hi everyone, Well I had this weird idea that I would like to share with you maybe it turns out to be helpful. So, can we somehow link comments with the code in a way that becomes updated with the source code itself ? Can we fix that issue where your documentation is automatically updated when