3 ms·
> In June, Apple introduced Swift System, a new library for Apple platforms that provides idiomatic interfaces to system calls and low-level currency types. "O
by rektide 6y ago
> In June, Apple introduced Swift System, a new library for Apple platforms that provides idiomatic interfaces to system calls and low-level currency types.
"One of these things is not like the other, one of these things does not belong"
I mean, it kind of fits, it works, but I did do a quintuple take trying process & make sure I was reading this first line correctly. Posting just to share. Read a little more to confirm, yeah, system calls & currency. Check & check.
One other idle thought, it would be interesting for something like the web platform to try to expose it's api's in a polyglot fashion. For some reason, this exposure, of Swift trying to open up more of it's platform to other platforms (that makes sense in context i swear) makes me think, how can the web platform keep expanding to offer more?
We're seeing really interesting neat early indicators with projects like Rust's web-sys, to wrap & expose the web platform in rust-webassembly. But what would it look like to try to expose & make useful JavaScript's new Temporal standard library, or Intl, or currenc... oh wait we don't have currency. ;)
- rektide 6y agowhy do i always get downvoted for having fun? i'm not sure if i want to be coached, but i wish dissenters had to offer something, other than minuses. did you all not also have fun at this mismatch? does the question of how to offer platforms up not entice you at all? is my tone off? so many downvotes on hacker news. i usually chalk it up to ya'll but i would like to know. -1! bah. who are you?! why?!
- microtherion 6y agoI didn't downvote you, but initially I did not get your joke. It does stand to reason, I guess, that currency is as fundamental to Apple as system calls are to Linux.
- bartvk 6y agoYou're rambling a little, is my guess. Plus, humor seems appreciated here, but not as the single point of a post.
- chrismsimpson 6y agoThe trolls need constant feeding. Wear your negative karma as a badge of honour.
- wux 6y agoThe term "currency type" is used here to mean a type that is commonly used. For example, although there are a variety of range types in the Swift standard library ('Range', 'ClosedRange', 'PartialRangeFrom', 'PartialRangeUpTo', etc.), 'Range' is considered the currency type. Similarly, among string types, 'String' is considered the currency type, as opposed to 'Substring', 'StaticString', etc. Like currency (money), the idea is that APIs in different libraries across different domains of programming will generally take values of the currency type as input and produce values of the currency type as output unless there's a good reason to use a different type. For Swift System, the stated goal is to provide low-level currency types; if that goal is accomplished, other users of Swift can rely on these types instead of supporting multiple disparate third-party wrappers of system calls that may provide similar functionality just so that they can interoperate with other libraries.
- lilyball 6y agoI’ve never before heard of the phrase “currency types”. I even searched the web for “system currency types” and only got money-related results.
- wux 6y agoIt may just be jargon specific to the Swift community: https://www.google.com/search?q=swift+evolution+%22currency+type%22 https://www.google.com/search?q=swift+evolution+%22currency+...