Link to home
Start Free TrialLog in
Avatar of SoLost
SoLostFlag for New Zealand

asked on

Does XCodes Swift have the equivalent of .NETs 'with'?

In VB.NET they have a very useful feature 'with'

e.g.

Dim Dog as new Animal
With Dog
    .Legs = 4
    .Tail = 1
    .Eyes = 2
End With

Open in new window


It prevents a lot of typing when you're accessing the same object many times.

Does XCodes Swift have a similar feature?
ASKER CERTIFIED SOLUTION
Avatar of darbid73
darbid73
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SoLost

ASKER

I read those and they basically say that it doesn't exist for Objective C either.

That's a shame.  It's a really handy feature that I miss quite a lot.