Is this the most ridiculous Xcode feature ever?

Do this:

  1. Open a playground.
  2. Enter: [1, 2, 3].
  3. Command-click either square bracket.
  4. Choose Add Item from the popup menu.

You get this:

Honestly, is the threshold of adding a comma and a new value so high that it justifies this feature?

Someone please explain this to me.

12 Comments

  • lmao

  • Probably for touch devices with tutorial of predefined elements.

  • Persists in Xcode 9.4b2, iOS playground. I have ⌘click reset to jump-to-definition but ⌃⌘click does as you describe.

  • It seems pointless on its face, but maybe this is useful for a touch interface, scripting, or accessibility.

  • Have you tried multiple cursors in Xcode yet?

    • I think she’s trying multiple curses AT Xcode.

  • I believe this is useful for searching large arrays. The add item feature is probably just there for completeness.

  • I think it’s just a action, coming from the iPad Version of Playgrounds

  • That new item is in blue Erica, BLUE!

    With the keyboard you only get purple.

    (Er, yeah, in case my humor doesn’t come through I’m agreeing with you, this seems like a silly thing for someone to have spent time on…maybe an intern? Maybe it fell out of a more general feature?)

  • @J It’s not purple it’s mauve.
    @Erica: because it’s possible?

    How about adding this:

    if signalReceived == 1 { break }

    then ⌘-click the curly and choose fold…

  • BTW, it is smart enough to not add a comma for [1, 2, ] which is impressive in its attention to detail.

  • I may of laughed at this a little too hard and a little too long. But you have to admit it is better than Siri’s jokes 🙂