Evaluating Expressions on Server-side Swift

379 Views Asked by At

What is the equivalent of NSExpression to evaluate numeric expressions on the server using Swift ? Is there a library that enable that ?

I'm getting this error when trying to use NSExpression on Linux:

fatal error: init(format:_:) is not yet implemented: file Foundation/NSExpression.swift, line 140

1

There are 1 best solutions below

4
On BEST ANSWER

NSExpression does not provide an initializer that just takes a format. Maybe you were going for

init(format: String, argumentArray: [Any])

or

init(format: String, arguments: CVaListPointer)

EDITED

As of 2016.12.27, most methods in NSExpression - including the init methods - have not yet been implemented.