|
LP0 ON FIRE posted:
No it means that only boolean values can be used like that. If you have an integer you need to go if(intValue != 0) etc but if trueBool {} is fine
|
# ¿ Jun 2, 2014 20:57 |
|
|
# ¿ May 3, 2024 08:03 |
|
JHVH-1 posted:HTML docs: And Using Swift with Cocoa and Objective-C https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/BuildingCocoaApps/index.html
|
# ¿ Jun 2, 2014 21:14 |
|
Damiya posted:I'm not an iOS dev, so maybe this is a dumb question, but since there's no GC does that mean all memory management has to be done by the programmer? It uses ARC, so memory management done by the compiler behind the scenes with retain counts.
|
# ¿ Jun 2, 2014 21:32 |
|
What's the difference between Array<String> and String[]? Are they just two different ways of describing the same thing?
|
# ¿ Jun 4, 2014 20:18 |
|
Filburt Shellbach posted:Yep, though I think it was mentioned in the book that String[] is the preferred style. Nice, I prefer that too
|
# ¿ Jun 4, 2014 20:25 |
|
rjmccall posted:@objc protocols are implemented via Objective-C message sends, so optional methods are easy to do with just conformsToProtocol/respondsToSelector checks. There's an obvious way to implement this for Swift native protocols, but we just haven't done it yet. something like @objc in the future being an alias for "messagable"?
|
# ¿ Jul 19, 2014 03:34 |
|
Ender.uNF posted:Oh yes, it's crazy. I'm going to try to buy if possible. I just can't pay 3000-4000 a month for an apartment. Afaik you want to avoid buying because transfer of ownership means taxes get recalculated in California, so it might be more expensive in the end. Least that's what I heard, I've only rented there.
|
# ¿ Jul 25, 2014 01:50 |
|
rjmccall posted:We designed it this way two years before that bug came out, but it's certainly a great reminder of why this is the right thing to do. It's also a great cudgel for convincing systems engineers to actually take advantage of the tools we give them. I am into this, cause every time I write a simple statement like if (a) b() I am tempted to write it like that. Then I rethink it and add the braces, but then I'm like, this is too busy looking plust the braces aren't necessary. Being forced to make the right choice is sometimes a gift, at least if you're a huge idiot like I am.
|
# ¿ Sep 7, 2014 02:04 |
|
I'm playing around with generating Swift programmatically. In C/Objc-C/etc you can put #line 95 "file.ext" to make errors & such point to the correct line in the input file that the Swift is generated from. I guess I can't do that in Swift?
|
# ¿ May 11, 2015 20:57 |
|
Alright, thanks
|
# ¿ May 11, 2015 21:46 |
|
Yeah, there aren't any copies until its necessary. e: Re this, these WWDC sessions were really good imo: Building Better Apps with Value Types in Swift https://developer.apple.com/videos/wwdc/2015/?id=414 Protocol-Oriented Programming in Swift https://developer.apple.com/videos/wwdc/2015/?id=408
|
# ¿ Jun 20, 2015 00:57 |
|
Most of you have probably seen this newsletter, but for those who haven't: https://swiftnews.curated.co
|
# ¿ Jun 26, 2015 19:45 |
|
swift ev proposal, murder everyone who makes grammar PRs
|
# ¿ Dec 5, 2015 02:50 |
|
rjmccall posted:I just saw a typography PR go by. They reformatted a document to use French spacing. One of my documents. Animals. Burn them!
|
# ¿ Dec 5, 2015 03:39 |
|
ultramiraculous posted:The Swift compiler is right loving there guys what are you doing. They're getting closer to the metal.
|
# ¿ May 13, 2016 00:32 |
|
that reminds me, are there plans to make swift more expressive?
|
# ¿ May 28, 2016 01:00 |
|
rjmccall posted:No, it's too expressive as it is and we need to cut back. Nice
|
# ¿ May 28, 2016 03:59 |
|
rjmccall posted:That was my first question, but apparently it is super common in numerics. im gonna tell on you dogg
|
# ¿ Jun 12, 2016 04:51 |
|
theres really good docs on rjmccall leaking stuff imo
|
# ¿ Jun 12, 2016 04:51 |
|
You can browse the archives: https://lists.swift.org/pipermail/swift-evolution/
|
# ¿ Aug 1, 2016 00:16 |
|
The book Cocoa Design Patterns by Yacktman & Buck taught me a lot about how Objective-C & Cocoa worked, but it's super old. I guess Swift is still too much of a moving target for a similar book on that?
|
# ¿ Jan 20, 2017 21:27 |
|
|
# ¿ May 3, 2024 08:03 |
|
dc3k posted:Such a pain. After our migration we're left with 19 billion fileprivate declarations and it's really annoying to get everyone to update to the proper declarations as they find them. We either end up with pull requests polluted with irrelevant changes, or have to spend time going through each file to fix it all. Dare I say, having 19 billion declarations are a problem in itself
|
# ¿ Feb 19, 2017 03:25 |