• Home
  • About

Saved searches

  • Remove
  • Verified account @
Suggested users
  • Verified account @
  • Verified account @
  • Language: English
    • Bahasa Indonesia
    • Bahasa Melayu
    • Català
    • Čeština
    • Dansk
    • Deutsch
    • English UK
    • Español
    • Filipino
    • Français
    • Hrvatski
    • Italiano
    • Magyar
    • Nederlands
    • Norsk
    • Polski
    • Português
    • Română
    • Slovenčina
    • Suomi
    • Svenska
    • Tiếng Việt
    • Türkçe
    • Ελληνικά
    • Български език
    • Русский
    • Српски
    • Українська мова
    • עִבְרִית
    • العربية
    • فارسی
    • मराठी
    • हिन्दी
    • বাংলা
    • ગુજરાતી
    • தமிழ்
    • ಕನ್ನಡ
    • ภาษาไทย
    • 한국어
    • 日本語
    • 简体中文
    • 繁體中文
  • Have an account? Log in
    Have an account?
    · Forgot password?

    New to Twitter?
    Sign up
By using Twitter’s services you agree to our Cookie Use and Data Transfer outside the EU. We and our partners operate globally and use cookies, including for analytics, personalisation, and ads.
mjtsai's profile
Michael Tsai
Michael Tsai
Michael Tsai
Verified account
@mjtsai

Michael TsaiVerified account

@mjtsai

Mac Software Developer

Joined August 2007
  • © 2016 Twitter
  • About
  • Help
  • Terms
  • Privacy
  • Cookies
  • Ads info
Dismiss
Previous
Next

Go to a person's profile

Saved searches

  • Remove
  • Verified account @
Suggested users
  • Verified account @
  • Verified account @

Retweet this to your followers?

Optional comment for Retweet
 
 

Saved searches

  • Remove
  • Verified account @
Suggested users
  • Verified account @
  • Verified account @
140

Are you sure you want to delete this Tweet?

Promote this Tweet

Block

  • Add a location to your Tweets

    When you tweet with a location, Twitter stores that location. You can switch location on/off before each Tweet and always have the option to delete your location history. Learn more

    Profile summary

    Your lists

    Create a new list


    Under 100 characters, optional

    Privacy

    Copy link to Tweet

    Embed this Tweet

    Embed this Video

    Add this Tweet to your website by copying the code below. Learn more

    Add this video to your website by copying the code below. Learn more

    Hmm, there was a problem reaching the server.

    Preview

    Log in to Twitter

    · Forgot password?
    Don't have an account? Sign up »

    Sign up for Twitter

    Not on Twitter? Sign up, tune into the things you care about, and get updates as they happen.

    Sign up
    Have an account? Log in »

    Two-way (sending and receiving) short codes:

    Country Code For customers of
    United States 40404 (any)
    Canada 21212 (any)
    United Kingdom 86444 Vodafone, Orange, 3, O2
    Brazil 40404 Nextel, TIM
    Haiti 40404 Digicel, Voila
    Ireland 51210 Vodafone, O2
    India 53000 Bharti Airtel, Videocon, Reliance
    Indonesia 89887 AXIS, 3, Telkomsel, Indosat, XL Axiata
    Italy 4880804 Wind
    3424486444 Vodafone
    » See SMS short codes for other countries

    Confirmation

     

    Buy Now

    Hmm... Something went wrong. Please try again.

    Welcome home!

    This timeline is where you’ll spend most of your time, getting instant updates about what matters to you.

    Tweets not working for you?

    Hover over the profile pic and click the Following button to unfollow any account.

    Say a lot with a little

    When you see a Tweet you love, tap the heart — it lets the person who wrote it know you shared the love.

    Spread the word

    The fastest way to share someone else’s Tweet with your followers is with a Retweet. Tap the icon to send it instantly.

    Join the conversation

    Add your thoughts about any Tweet with a Reply. Find a topic you’re passionate about, and jump right in.

    Learn the latest

    Get instant insight into what people are talking about now.

    Get more of what you love

    Follow more accounts to get instant updates about topics you care about.

    Find what's happening

    See the latest conversations about any topic instantly.

    Never miss a Moment

    Catch up instantly on the best stories happening as they unfold.

    Previous Tweet
    1. Michael Tsai ‏@mjtsai 17 Jul 2014

      @roopeshchander How does that work if I'm using "string" multiple times throughout the rest of the method?

      0 replies 0 retweets 0 likes
    2. Roopesh Chander ‏@roopeshchander 17 Jul 2014

      @mjtsai It doesn't :). You will have to use an `if` block in that case, I admit.

      0 replies 0 retweets 0 likes
    3. Roopesh Chander ‏@roopeshchander 17 Jul 2014

      @mjtsai A minor defence: A macro with a return in it makes the code somewhat hard to read and decipher by others

      0 replies 0 retweets 0 likes
    4. Michael Tsai ‏@mjtsai 17 Jul 2014

      @roopeshchander Yeah, some people won't like that. I think it's worth it, and it's basically the same pattern Apple's macros have long used.

      0 replies 0 retweets 0 likes
    5. Roopesh Chander ‏@roopeshchander 17 Jul 2014

      @mjtsai I can see the value in macros like that. But I don't see a way to do that in Swift. Or rather, that doesn't fit with The Swift Way.

      0 replies 0 retweets 0 likes
    6. Roopesh Chander ‏@roopeshchander 17 Jul 2014

      @mjtsai And about the adding a `!` after each variable use, have you considered implicit unwrapping?

      0 replies 0 retweets 0 likes
    7. Michael Tsai ‏@mjtsai 17 Jul 2014

      @roopeshchander That's discussed in the comments.

      0 replies 0 retweets 0 likes
    8. Roopesh Chander ‏@roopeshchander 17 Jul 2014

      @mjtsai Just saw that. On second thoughts, it's better NOT to use implicit unwrapping here, coz we need to check for nil. if-let is better.

      0 replies 0 retweets 0 likes
    9. Michael Tsai ‏@mjtsai 17 Jul 2014

      @roopeshchander Choice between compiler help with safety and avoiding extra indentation.

      0 replies 0 retweets 0 likes
    10. Roopesh Chander ‏@roopeshchander 17 Jul 2014

      @mjtsai We can't avoid the extra indentation because `if` is unavoidable, right?

      0 replies 0 retweets 0 likes
      Michael Tsai Verified account ‏@mjtsai 17 Jul 2014

      @roopeshchander Right. That's why I think there needs to be a better way to do this in Swift.

      6:39 AM - 17 Jul 2014
      0 replies 0 retweets 0 likes
        1. Roopesh Chander ‏@roopeshchander 17 Jul 2014

          @mjtsai @mjtsai I don't think an `if` block by itself makes it bad-looking code.

          0 replies 0 retweets 0 likes
        2. Michael Tsai ‏@mjtsai 17 Jul 2014

          @roopeshchander My main issue is that there's going to be 3+ lines of error-handling code for each line that does something that might fail.

          0 replies 0 retweets 0 likes
        3. Roopesh Chander ‏@roopeshchander 17 Jul 2014

          @mjtsai Stepping back, I think it's weird that an NSString's init() can fail. Ideally, there would only be a class method in Swift, I think.

          0 replies 0 retweets 0 likes
        4. View other replies
        5. Roopesh Chander ‏@roopeshchander 17 Jul 2014

          @mjtsai Because, unlike Obj-C, Swift init() doesn't return the self object.

          0 replies 0 retweets 0 likes
        6. Michael Tsai ‏@mjtsai 17 Jul 2014

          @roopeshchander Yeah. Will be interesting to see how this evolves in Swift. Not sure I like the current way of wrapping in class methods.

          0 replies 0 retweets 0 likes
        7. Roopesh Chander ‏@roopeshchander 22 Jul 2014

          @mjtsai Beta 4: "Swift does not support object initializers that fail by returning null." (Workaround: factory method.)

          0 replies 0 retweets 0 likes
        8. View other replies
        9. Michael Tsai ‏@mjtsai 22 Jul 2014

          @roopeshchander I think that’s what it said in precious versions, too. Hope they come up with something.

          0 replies 0 retweets 0 likes

      Loading seems to be taking a while.

      Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.

        Promoted Tweet

        false

        • © 2016 Twitter
        • About
        • Help
        • Terms
        • Privacy
        • Cookies
        • Ads info