Re: [swift-users] Parsing Decimal values from JSON

2017-10-31 Thread Ireland, Evan via swift-users
Rimantas, At json.org the grammar for numbers does not limit the precision to IEEE double precision. There are specifications (e.g. OData 4.0) which pemit decimal/integer values being encoded as JSON numbers that might go outside the range of IEEE double, with an expectation that agents (clien

Re: [swift-users] Justification for Swift Design Decisions?

2017-10-31 Thread Michael Rogers via swift-users
> On Oct 31, 2017, at 3:39 PM, Austin Zheng wrote: > > To expand on this, most (if not all) the proposals in the list of proposals > on GitHub (https://github.com/apple/swift-evolution/tree/master/proposals > ) have a > "Rationa

Re: [swift-users] Justification for Swift Design Decisions?

2017-10-31 Thread Austin Zheng via swift-users
Sorry for the second email, but there's one link in particular that I think might be valuable (and is not easily found any other way). This little discussion by Chris Lattner discusses the dynamic nature of some popular programming languages compared to Swift, and has some explanation as to why Swi

Re: [swift-users] Justification for Swift Design Decisions?

2017-10-31 Thread Austin Zheng via swift-users
To expand on this, most (if not all) the proposals in the list of proposals on GitHub (https://github.com/apple/swift-evolution/tree/master/proposals) have a "Rationale" link to a mailing list archive post by one of the Swift core team members explaining why a certain decision was reached. Those ar

Re: [swift-users] Justification for Swift Design Decisions?

2017-10-31 Thread David Sweeris via swift-users
Specifically WRT to double quotes for characters, the Commonly Rejected Changes doc (https://github.com/apple/swift-evolution/blob/master/commonly_proposed.md) says, "Swift takes the approach of highly valuing Unicode. However, there are multiple concepts of a character that could make sense in

Re: [swift-users] Parsing Decimal values from JSON

2017-10-31 Thread Itai Ferber via swift-users
I can’t speak to any resistance you’ve seen from the Swift team (nor to any performance issues you’ve encountered with `JSONSerialization`), but just keep in mind that a) `JSONSerialization` is maintained by the Foundation team, and b) maintaining a separate JSON parsing implementation just for

Re: [swift-users] Parsing Decimal values from JSON

2017-10-31 Thread Jon Shier via swift-users
The appropriate solution here would be for Swift to have its own native JSON parser that allows direct decoding into generic types without the intermediary of JSONSerialization. For whatever reason there seems to be resistance to this from the Swift team, but until we have that ability,

Re: [swift-users] Parsing Decimal values from JSON

2017-10-31 Thread Itai Ferber via swift-users
Hi Evtim, Just want to give some context for this. This is due to the fact that `JSONEncoder` and `JSONDecoder` are currently based on `JSONSerialization`: when you go to decode some JSON data, the data is deserialized using `JSONSerialization`, and then decoded into your types by `JSONDecoder

[swift-users] Justification for Swift Design Decisions?

2017-10-31 Thread Michael Rogers via swift-users
Hi, All: I’m giving a presentation on Swift this weekend, and am trying to find justification for some of the design decisions that they made. Is there anything out there that goes into the detail of this? Like … why did the use “ for characters, or \() for String interpolation? Thanks, Micha

Re: [swift-users] Finding resources.

2017-10-31 Thread Nate Birkholz via swift-users
Hi, Moughees. This mailing list is for issues found developing with the Swift language and not for help with third party frameworks such as Vapor. Looking at the page for Vapor at https://github.com/vapor/vapor it seems that they use a Slack channel for support. I would suggest you install a Slack

Re: [swift-users] Parsing Decimal values from JSON

2017-10-31 Thread Rimantas Liubertas via swift-users
> > Swift shouldn't be forced to adhere to the limitations of JavaScript. Just > because JS doesn't know about decimals doesn't mean swift can't do better. > JSON does not know about decimals either. http://json.org/. If you need some custom data type you can always pass it as a string and then han