Live data from Hacker News

“Swift will be open source later this year”

apple.com

421–430 of 573 posts

Re: “Swift will be open source later this year”

#421
post #350

Earlier quoted context omitted.

Yes, I've done Java in the enterprise. It's a 20 year old language and there's an estimated 9 million Java developers. Swift is only one1 but with open source and cross-platform ability (Microsoft will port to Windows), I think we have several million Swift developers with 5 years. [Update] 30 -> 20

As much as I like Swift, without real garbage collection I wouldn't want to use it an any enterprise project. Keeping track of ownership of reference counted objects shared between who knows how many other objects sounds like a nightmare.

There's nothing to keep track of, all reference counting is handled through ARC which is built in to the compiler.

Re: “Swift will be open source later this year”

#422

Earlier quoted context omitted.

> Too little too late. Apple could have got my attention if they had done this from the start, but at this point I find it hard to get excited about this. That's just like your opinion man. If Swift is Open Source it's gonna be a huge thing, for two reasons: (a) it already attracts millions of developers because it's the suggested language to develop iOS apps in, and (b) it's a nice modern language that plays in a ve…

> it already attracts millions of developers because it's the suggested language to develop iOS apps in Which I pointed out isn't always a good thing. You know how Rails kind of overshadows Ruby because so much use of Ruby is related to rails? Well I think swift will face the same exact fate. I'm not interested in developing iOS frontends or iOS backends in the language. I firmly believe Web will win, and I believe i…

"Web is winning."

If you mean "everything but HTML-based web sites", that's accurate. If you mean the actual Web sites, I really don't see it. The Web is huge, so isn't exactly dying, but it certainly isn't winning.

Native mobile is "winning", in terms of being usually a far superior UX, and by sheer numerical demand. Native still often (thankfully) uses architectural elements of the web (URIs and HTTP) and the UX of Hyperlinking. But the HTML web as we know it hasn't kept up well with the native experience. With the massive investments in IoT being laid down along with VR/AR experiences coming out of Facebook, Google, and Microsoft, this trend will likely only continue, unless someone releases a new innovative hypermedia format & client that catches on.

"They're giving you new languages and development environments because they are holding on for dear life, and I'm not willing to accept being charmed into closed development environments."

I applaud your commitment to openness, truly, but I suggest you need to look at the global market little harder. These companies are not holding on for dear life. They're growing in power. I watched the WWDC Keynote. The crowd just about had kittens when they announced Swift will be open sourced. Twitter nearly exploded. These are anecdotes yes, but the numbers are backing Swift's meteoric rise.

Apple has a vested interest to promote Swift far and wide, perhaps even going so far as Sun did with Java, with the hindsight of their mistakes. Whereas Google could have done this with Golang but seem to be keeping a lid on it for unknown reasons. Best theory I have is that Apple is a product company and Google is a technology company. Golang is making good headway as a server-side language mainly by several companies that aren't Google.

Re: “Swift will be open source later this year”

#423

Earlier quoted context omitted.

I've been wondering for a while now why no one builds an Obj C backend for their apps: https://news.ycombinator.com/item?id=9500855 Being able to deploy on Linux might be what it takes!

I long dreamed of using Objective C to build server apps. The compiler support has been there for years (GCC, later Clang), but there's no standard library. All the stuff you would want from Foundation is missing; strings, sockets, file I/O, encoding support, threads, etc., it turns out you'd have to reimplement a lot from scratch. There's GNUstep, but last I looked it, it was stagnant, and also very much geared towa…

The Étoile OS folks have been working on top of GNUStep for a while: http://etoileos.com/

Here's a recent thing that came out of that group, which I'm interested to see in a server-side project: http://coreobject.org/

Re: “Swift will be open source later this year”

#424

Earlier quoted context omitted.

> it already attracts millions of developers because it's the suggested language to develop iOS apps in Which I pointed out isn't always a good thing. You know how Rails kind of overshadows Ruby because so much use of Ruby is related to rails? Well I think swift will face the same exact fate. I'm not interested in developing iOS frontends or iOS backends in the language. I firmly believe Web will win, and I believe i…

"Web is winning." If you mean "everything but HTML-based web sites", that's accurate. If you mean the actual Web sites, I really don't see it. The Web is huge, so isn't exactly dying, but it certainly isn't winning. Native mobile is "winning", in terms of being usually a far superior UX, and by sheer numerical demand. Native still often (thankfully) uses architectural elements of the web (URIs and HTTP) and the UX of…

> Native mobile is "winning", in terms of being usually a far superior UX, and by sheer numerical demand.

Yeah?

I could type a URL to anything here, and you could view it.

If instead hide my content behind an app, I can't deep link to it. The likelihood of you installing the app to see the content is way lower. You need space on your mobile device to install my app. Potentially a password entered to install it. It needs to be compatible with your device. You need to approve my permissions. The content of my app isn't searched in any search engine. You can't bookmark where you were.

I'm not at all convinced that native mobile has "far superior UX." Sure, aspects of it, no question.

And sheer numerical demand? Again, I'm not so sure. Actually, I'm quite sure you're wrong.

Re: “Swift will be open source later this year”

#425

I will surely be downvoted for speaking so off the cuff, but I haven't really enjoyed swift so far. How has the general developer reception been to the language, not just with respect to obj-c, but also to java or any other turing complete language?

Swift's popularity has undergone a meteoric rise for a young language according to TIOBE [ http://www.tiobe.com/index.php/content/paperinfo/tpci/index.... ] But that's not surprising given its ecosystem; as others have mentioned, language success has less to do about its theoretical benefits and more to do about what environments it allows the developer access to. Javascript is the case-in-point; I think few people w…

Given the context it's used in, this is hardly surprising.

Re: “Swift will be open source later this year”

#426

Earlier quoted context omitted.

What I personally dislike about Swift is the change in mental context when dealing with the combination of C/C++ and Swift code. Plenty of nontrivial apps use significant amounts of C and/or C++ libraries in some way. The switch when dealing with a combination of C/C++ and Objective-C source was not really a problem. But trying to interface a C++ library into a Swift application is less than a fun experience. Persona…

Do you have any notes on this experience posted somewhere publicly? I'd love to see an overview of the issues between Swift and C++ libraries. (Boost? Not Boost? The nuances of Swift's type system?)

You can't communicate between Swift and C++ right now... it's on their bucket list though :)

Re: “Swift will be open source later this year”

#427
post #108

Apple explicitly said they see Swift as a systems language... curious what people thing about that. Does it compete with C/Rust, or is it just a pipe dream/marketing message?

It's designed to give it hype, it's not a systems language. The first question you should ask for any systems language is how to I integrate assembler, when the answer is to use C / C++ then you know it's not a systems language. Also, how you can tell a language is a systems language, it has an operating system written in it used by a large user base. How do you layout a struct in Swift so that it's the exact size an…

They could be using the Go definition of a system language, which turned out to be things like web servers, not kernels.

Re: “Swift will be open source later this year”

#428
post #296

Earlier quoted context omitted.

In my experience, in the wide world of programming languages Rust and Swift are really not very far apart. Swift's designers even cited Rust as an influence.

> Swift's designers even cited Rust as an influence. Specifically, http://nondot.org/sabre/ > Of course, it also greatly benefited from the > experiences hard-won by many other languages in the > field, drawing ideas from Objective-C, Rust, Haskell, > Ruby, Python, C#, CLU, and far too many others to list.

...you can say they looked at as an influence.

Re: “Swift will be open source later this year”

#429
post #301
post #246

Earlier quoted context omitted.

You seem to be confusing Java-like interfaces and design patterns with types. That's not representative of what great type systems can do for you.

I'm confusing types and 'Java-like interfaces and design patterns' to the same degree that you're confusing swift's type system with 'what great type systems can do for you.' The type system of swift is much closer to java than to that of haskell. (Or whatever language you think has a 'great' type system) For example in F# if you just use one method the type system will infer that you need an object that has that met…

You mistake me: I wasn't talking about Swift, a language I'm barely familiar with. I was puzzled by your more general assertion about "the kind of apps where a great type system would really shine". So far you haven't explained what you meant by this; you seemed to be complaining about enterprise software, but a lot of enterprise software isn't built with programming languages featuring great or even particularly modern type systems.

I'm not sure what reflection has to do with this. I'm sure you're aware there are "great type systems" which do not use reflection.

Re: “Swift will be open source later this year”

#430
post #395

Earlier quoted context omitted.

CoreFoundation has a MakefileLinux[1] for versions since 635 (corresponding to 10.7, if I'm not mistaken) — anybody know the status of that? It obviously relies on Clang (as it uses various extensions), but does it build, is it useful? [1]: http://www.opensource.apple.com/source/CF/CF-1151.16/Makefil...

What language is that link written in? It looks like bash sort of but not really?

It's a Makefile[1]. They are quite simple really. They're defined like this:

  target: dependencies
      command
The command is run by a shell (e.g. bash!) when the target is called to be run. For example...

  all: hello world
      echo "!"

  hello:
      echo "Hello"

  world:
      echo "World"
Now if you run "make", you will see each command being run. By default, if you call "make" with no arguments, the "all" target will be run. You can also call "make world" for example, to have it only run the "world" target. As you can see, first the dependencies of the target are called, then the command of the target is run.

It's often used by C/C++ projects in order to manage dependencies, but can be used for anything really.

Here's a short tutorial you can walk through if you're interested in how it works and why it's useful: http://mrbook.org/blog/tutorials/make/

1. https://en.wikipedia.org/wiki/Makefile

Post reply on HN