allenu,
@allenu@mastodon.social avatar

I asked ChatGPT if there's a syntax in Swift that lets you make a copy of a struct with a list of properties to change and it said yes, there's a "with" syntax so you can do let foo = bar.with { $0.x = 1234 }, kind of like I've seen in F#.

I got excited because I didn't realize such a thing existed. I tried it, though, and it doesn't exist. lmao It made it up.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • swift
  • DreamBathrooms
  • everett
  • osvaldo12
  • magazineikmin
  • thenastyranch
  • rosin
  • normalnudes
  • Youngstown
  • Durango
  • slotface
  • ngwrru68w68
  • kavyap
  • mdbf
  • InstantRegret
  • JUstTest
  • ethstaker
  • GTA5RPClips
  • tacticalgear
  • Leos
  • anitta
  • modclub
  • khanakhh
  • cubers
  • cisconetworking
  • megavids
  • provamag3
  • tester
  • lostlight
  • All magazines