Re: OT: Swift is now open source

2015-12-08 Thread deadalnix via Digitalmars-d
On Friday, 4 December 2015 at 03:18:02 UTC, Steven Schveighoffer wrote: The type system is static, and everything is done via inference, which is very nice. According to a swift dev I talked to, part of the algorithm is exponential and they have compile time problem because of this. Speed

Re: OT: Swift is now open source

2015-12-08 Thread Steven Schveighoffer via Digitalmars-d
On 12/8/15 4:14 AM, deadalnix wrote: On Friday, 4 December 2015 at 03:18:02 UTC, Steven Schveighoffer wrote: The type system is static, and everything is done via inference, which is very nice. According to a swift dev I talked to, part of the algorithm is exponential and they have compile

Re: OT: Swift is now open source

2015-12-08 Thread Chris Wright via Digitalmars-d
On Tue, 08 Dec 2015 08:38:23 -0500, Steven Schveighoffer wrote: > On 12/8/15 4:14 AM, deadalnix wrote: >> On Friday, 4 December 2015 at 03:18:02 UTC, Steven Schveighoffer wrote: >>> The type system is static, and everything is done via inference, which >>> is very nice. >>> >>> >> According to a

Re: OT: Swift is now open source

2015-12-08 Thread deadalnix via Digitalmars-d
On Tuesday, 8 December 2015 at 17:16:50 UTC, Chris Wright wrote: On Tue, 08 Dec 2015 08:38:23 -0500, Steven Schveighoffer wrote: On 12/8/15 4:14 AM, deadalnix wrote: On Friday, 4 December 2015 at 03:18:02 UTC, Steven Schveighoffer wrote: The type system is static, and everything is done via

Re: OT: Swift is now open source

2015-12-07 Thread tcak via Digitalmars-d
On Friday, 4 December 2015 at 02:59:21 UTC, tcak wrote: On Thursday, 3 December 2015 at 20:37:04 UTC, Steven Schveighoffer wrote: On 12/3/15 3:16 PM, Meta wrote: [...] You may misunderstand -- I prefer semicolons. But having to write swift code for a few weeks, I find now when I write D

Re: OT: Swift is now open source

2015-12-06 Thread Joakim via Digitalmars-d
On Thursday, 3 December 2015 at 17:19:03 UTC, Jack Stouffer wrote: On Thursday, 3 December 2015 at 17:13:49 UTC, Jack Stouffer wrote: https://github.com/apple/swift Fun Fact: in the time it took apple to open source this (announcement to now), D has had six open source releases (2.068 -

Re: OT: Swift is now open source

2015-12-06 Thread Jacob Carlborg via Digitalmars-d
On 2015-12-06 03:02, Michel Fortin wrote: Apple's API is still rather verbose and hard to discover, but that is not swift's fault. They could have gone the D route by separating the method name from the selector: extern(Objective-C) class Foo { void bar()

Re: OT: Swift is now open source

2015-12-06 Thread Daniel N via Digitalmars-d
On Sunday, 6 December 2015 at 10:43:24 UTC, Jacob Carlborg wrote: Not really what I needed, for me it would be enough with slicing the bytes. I can't really test it, since I'm stuck on "Mavericks" and they stopped updating XCode. (last version before they destroyed the UI). But this

Re: OT: Swift is now open source

2015-12-06 Thread Michel Fortin via Digitalmars-d
On 2015-12-06 10:43:24 +, Jacob Carlborg said: You're decoding characters (grapheme clusters) as you advance those indexes. Not really what I needed, for me it would be enough with slicing the bytes. That only works if the actual underlying representation is UTF8 (or

Re: OT: Swift is now open source

2015-12-06 Thread Jacob Carlborg via Digitalmars-d
On 2015-12-06 14:45, Michel Fortin wrote: That only works if the actual underlying representation is UTF8 (or other single-byte encoding). String abstracts that away from you. But you can do this if you want to work with bytes: let utf8View = str.utf8

Re: OT: Swift is now open source

2015-12-05 Thread Michel Fortin via Digitalmars-d
On 2015-12-04 07:51:32 +, Jacob Carlborg said: On 2015-12-03 20:10, Steven Schveighoffer wrote: The truth is, swift is orders of magnitude better than Objective C. I have gotten used to the nullable API, though it sometimes seems more clunky than useful. I find it very

Re: OT: Swift is now open source

2015-12-04 Thread Kagamin via Digitalmars-d
On Thursday, 3 December 2015 at 17:56:49 UTC, tcak wrote: Even on C#, there is nothing like giving the type of a variable like "typeof( another_variable_or_enum ) var;". C# and Java programmers are not aware of what things they are missing :D Never needed typeof. Missing scope guards and

Re: OT: Swift is now open source

2015-12-04 Thread Chris via Digitalmars-d
On Friday, 4 December 2015 at 02:59:21 UTC, tcak wrote: On Thursday, 3 December 2015 at 20:37:04 UTC, Steven Schveighoffer wrote: On 12/3/15 3:16 PM, Meta wrote: On Thursday, 3 December 2015 at 19:10:04 UTC, Steven Schveighoffer wrote: And the lack of semi-colons has poisoned me from writing

Re: OT: Swift is now open source

2015-12-04 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 4 December 2015 at 10:24:48 UTC, Chris wrote: As opposed to D, there is a lot of conversion going on from C to Swift And they will have to keep converting, as there are breaking changes planned for Swift 3.0: https://github.com/apple/swift-evolution/blob/master/README.md

Re: OT: Swift is now open source

2015-12-04 Thread Bubbasaur via Digitalmars-d
Seems controversial: https://github.com/apple/swift-evolution/blob/master/proposals/0004-remove-pre-post-inc-decrement.md Bubba.

Re: OT: Swift is now open source

2015-12-04 Thread rcorre via Digitalmars-d
On Friday, 4 December 2015 at 03:38:23 UTC, Steven Schveighoffer wrote: Yes, I know that trick. In swift, everywhere you are using/expecting a Foo, it allows the shortcut. It's very nice when you are doing things that require a lot of enum function parameters (UI has a lot of this).

Re: OT: Swift is now open source

2015-12-04 Thread karabuta via Digitalmars-d
On Thursday, 3 December 2015 at 20:22:39 UTC, Adam D. Ruppe wrote: On Thursday, 3 December 2015 at 20:16:50 UTC, Meta wrote: Surprisingly (or not), lack of semicolons is something that I have sorely missed in D/++/Java/C#/etc. ever since I first tried Ruby. There's a lot to be said for the

Re: OT: Swift is now open source

2015-12-04 Thread Jacob Carlborg via Digitalmars-d
On 2015-12-04 13:35, rcorre wrote: Do you mean something like: enum Foo { bar, baz } void fun(Foo foo) { } fun(baz); I don't really mind having to use switch/with but I've found myself wishing for the above on occasion. Yes, but in Swift you need to prefix "baz" with a dot. -- /Jacob

Re: OT: Swift is now open source

2015-12-03 Thread Steven Schveighoffer via Digitalmars-d
On 12/3/15 9:59 PM, tcak wrote: On Thursday, 3 December 2015 at 20:37:04 UTC, Steven Schveighoffer wrote: On 12/3/15 3:16 PM, Meta wrote: On Thursday, 3 December 2015 at 19:10:04 UTC, Steven Schveighoffer wrote: And the lack of semi-colons has poisoned me from writing syntactically valid

Re: OT: Swift is now open source

2015-12-03 Thread Steven Schveighoffer via Digitalmars-d
On 12/3/15 10:22 PM, rsw0x wrote: On Friday, 4 December 2015 at 03:18:02 UTC, Steven Schveighoffer wrote: On 12/3/15 9:59 PM, tcak wrote: [...] It is meant to be a replacement for Objective C. I'd put it more at the C level, but there are something that are very UNLIKE C. For example, they

Re: OT: Swift is now open source

2015-12-03 Thread Jacob Carlborg via Digitalmars-d
On 2015-12-04 04:18, Steven Schveighoffer wrote: In D-speak, it looks like this: enum Foo { Bar, Baz } Foo foo; switch(foo) { case .Bar: // Foo is implied case .Baz: } void fun(Foo); fun(.Bar); // Foo is implied I don't think we could have this exact syntax, though. I

Re: OT: Swift is now open source

2015-12-03 Thread Jacob Carlborg via Digitalmars-d
On 2015-12-03 20:10, Steven Schveighoffer wrote: The truth is, swift is orders of magnitude better than Objective C. I have gotten used to the nullable API, though it sometimes seems more clunky than useful. I find it very clunky as well. Sometimes it's too strict. I was a bit surprised

Re: OT: Swift is now open source

2015-12-03 Thread rsw0x via Digitalmars-d
On Friday, 4 December 2015 at 03:18:02 UTC, Steven Schveighoffer wrote: On 12/3/15 9:59 PM, tcak wrote: [...] It is meant to be a replacement for Objective C. I'd put it more at the C level, but there are something that are very UNLIKE C. For example, they do not have any direct instance

OT: Swift is now open source

2015-12-03 Thread Jack Stouffer via Digitalmars-d
https://github.com/apple/swift

Re: OT: Swift is now open source

2015-12-03 Thread Jack Stouffer via Digitalmars-d
On Thursday, 3 December 2015 at 17:13:49 UTC, Jack Stouffer wrote: https://github.com/apple/swift Fun Fact: in the time it took apple to open source this (announcement to now), D has had six open source releases (2.068 - 2.069.2).

Re: OT: Swift is now open source

2015-12-03 Thread Steven Schveighoffer via Digitalmars-d
On 12/3/15 12:56 PM, tcak wrote: On Thursday, 3 December 2015 at 17:13:49 UTC, Jack Stouffer wrote: https://github.com/apple/swift Everytime I get excited about another programming language, I notice that it lacks some nice features of D, and I become sad suddenly. Even on C#, there is

Re: OT: Swift is now open source

2015-12-03 Thread Meta via Digitalmars-d
On Thursday, 3 December 2015 at 19:10:04 UTC, Steven Schveighoffer wrote: And the lack of semi-colons has poisoned me from writing syntactically valid lines in D :) Surprisingly (or not), lack of semicolons is something that I have sorely missed in D/++/Java/C#/etc. ever since I first tried

Re: OT: Swift is now open source

2015-12-03 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 3 December 2015 at 20:16:50 UTC, Meta wrote: Surprisingly (or not), lack of semicolons is something that I have sorely missed in D/++/Java/C#/etc. ever since I first tried Ruby. There's a lot to be said for the little quality of life features in a language. I, on the other hand,

Re: OT: Swift is now open source

2015-12-03 Thread Steven Schveighoffer via Digitalmars-d
On 12/3/15 3:16 PM, Meta wrote: On Thursday, 3 December 2015 at 19:10:04 UTC, Steven Schveighoffer wrote: And the lack of semi-colons has poisoned me from writing syntactically valid lines in D :) Surprisingly (or not), lack of semicolons is something that I have sorely missed in

Re: OT: Swift is now open source

2015-12-03 Thread Ola Fosheim Grøstad via Digitalmars-d
On Thursday, 3 December 2015 at 17:56:49 UTC, tcak wrote: On Thursday, 3 December 2015 at 17:13:49 UTC, Jack Stouffer wrote: https://github.com/apple/swift Everytime I get excited about another programming language, I notice that it lacks some nice features of D, and I become sad suddenly.

Re: OT: Swift is now open source

2015-12-03 Thread tcak via Digitalmars-d
On Thursday, 3 December 2015 at 20:37:04 UTC, Steven Schveighoffer wrote: On 12/3/15 3:16 PM, Meta wrote: On Thursday, 3 December 2015 at 19:10:04 UTC, Steven Schveighoffer wrote: And the lack of semi-colons has poisoned me from writing syntactically valid lines in D :) Surprisingly (or

Re: OT: Swift is now open source

2015-12-03 Thread tcak via Digitalmars-d
On Thursday, 3 December 2015 at 17:13:49 UTC, Jack Stouffer wrote: https://github.com/apple/swift Everytime I get excited about another programming language, I notice that it lacks some nice features of D, and I become sad suddenly. Even on C#, there is nothing like giving the type of a