swift-2048

Games

puzzle game

SHOW HN2014

92points
34comments
#307of 2,272 in 2014
Top 14%of 2014 by points

How HN took it

RoastedHalf or more of the comments are critical

2 positive, 4 neutral or asking, 0 mixed, 6 critical, out of 12 comments about the project. Thread score -0.25.

Idea: 1 for, 4 againstDesign: 1 for, 2 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Swift code is more readable and concise than Objective-C.

    From 1 comment
    • I was playing with it a bit this morning porting a helper XML parsing class[0] I have over to it and building a simple RSS Reader project. I'm one of those people that really…
      k-mcgrady on HN
  • Credit to Threes is appreciated.

    From 1 comment
    • Kudos for crediting "Threes"! That game doesn't get enough credit amidst the popularity of 2048.
      kin on HN

Objections

  • Swift lacks private/public access control and exceptions for now.

    From 2 comments
    • >> Still have no idea how to make things private, public, or protected. In Objective-C you could hide internal details away in the .m file. In Swift, everything is exposed by…
      olgagalchenko on HN
    • I asked a Swift engineer named Greg about this yesterday at a Swift lab at WWDC -- he said that it is forthcoming, but gave no estimates or timelines. Exception handling,…
      dzlobin on HN
  • Code example syntax (case let) is awkward.

    From 1 comment
    • > case let .NoAction(_, v): return v That's amazingly awkward syntax for a brand-new language. "case let"? In many other languages with pattern matching and destructuring, the…
      JoshTriplett on HN

Questions

  • How do enums with associated values and pattern matching work in Swift?

    From 2 comments
    • Can someone give a quick overview of whats going on with this code? I'm feeling a bit lost on how enums are being declared and used in swift. ``` enum ActionToken { case…
      seanalltogether on HN
    • Swift's enums are like Rust's enums, so they're much more powerful than C's enums: In C an enum can assume one of multiple predefined values of type `int`. In Swift an enum can…
      TheCoreh on HN

Alternatives named

  • 2048 implementations in other languages such as Go and Rust-style enums

    From 2 comments
    • I guess this whole "X in Go" trend is now being replaced with "X in Swift"
      talhof8 on HN
    • It's the same as case classes and pattern matching in Scala [1]. Or case expression and pattern matching in Haskell [2]. Or in OCaml [3]. Or in Rust [4]. [1]…
      sampo on HN
  • Threes

    From 1 comment
    • Kudos for crediting "Threes"! That game doesn't get enough credit amidst the popularity of 2048.
      kin on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/7845441)