Live data from Hacker News

Swift Programming Language Evolution

github.com

61–70 of 181 posts

Re: Swift Programming Language Evolution

#61
post #47

Does "will be portable" include any notion of a cross-platform UI?

Languages don't have UIs - frameworks do. I realise it's a pedantic distinction, but it's an important one.

I get the distinction, but there appears to be a deliberate direction to make Swift more portable. Thus, I was curious if that effort might include something UI related in the future. The interest level would certainly spike up if something were available.

Re: Swift Programming Language Evolution

#62
post #49

The removal of prefix and postfix ++ and -- operators and the removal of C-style for loops are mistakes, IMO.

I gotta disagree with this one. Those operators have always been confusing and unnecessary. j = i++ being different from j = ++i alone is enough to convince me it's gotta go.

++i and i++ have their uses. Just because it is confusing to you doesn't mean it is confusing to others. There are things about swift that are confusing to me, but I don't out right say that it has to go.

Chalk this one up to shit hacker news says.

Re: Swift Programming Language Evolution

#63
post #29
post #8

Earlier quoted context omitted.

My favorite thing about Swift is that is seems to get out of the way - and when it gets in the way it's usually with a nifty language feature (like the { $0 + $1 } closure syntax). I'm very excited for the future - between Go and Swift we now have two compiled fast languages that are almost as expressive as their slower dynamic/interpreted cousins. As an aside, I like that Apple is betting the farm on ARC. I wish I c…

I love go but if one thing that it is not is - expressive, especially when compared to its dynamic cousins like Ruby/Python. That is a tradeoff I am willing to live with, but there is no need to get starry eyed over it.

Can you give an example? I've been writing a bunch of swift recently and I actually find it somewhat more expressive than either of those.

Re: Swift Programming Language Evolution

#64
post #49

The removal of prefix and postfix ++ and -- operators and the removal of C-style for loops are mistakes, IMO.

I gotta disagree with this one. Those operators have always been confusing and unnecessary. j = i++ being different from j = ++i alone is enough to convince me it's gotta go.

Exactly. I am disappointed they're removing function currying/partial application syntax though :(

Re: Swift Programming Language Evolution

#65
post #21

Earlier quoted context omitted.

I'd put Go at the top of the languages to compare it to. Maybe Java as well. The ecosystem still needs some time, but Swift's potential on the server is excellent: - It is incredibly fast compared to current interpreted languages (i. e. factor 30+ vs. Python, possibly faster than C) - Linux & OS X, open source - Typed, safe People like node.js mostly b/c it allows some code to be written once and run on both the serv…

Every new language has someone claim it's faster than C. I'll believe it when I see it.

Both C++ and Rust beat C in many cases for various reasons.

Re: Swift Programming Language Evolution

#66
post #19

So Swift has been out awhile, what do people think of it? What other language would you compare it to (e.g. C#, C, C++, etc)? What about the libraries are they well laid out?

I tried it an pretty quickly went back to C#. The Apple-only nature was the major downside to me, so maybe these kinds of changes will help (assuming it sees wide adoption outside of Apple-land). Check your local job boards, but if sell yourself as a Swift dev you're likely to be pigeon-holed into Apple-centric development for the foreseeable future. With Apple sales and market share dropping like a rock in the last…

So abiding by that same logic, would you not agree that developing for Android has been a poor career decision up until say, 12 months ago?

Re: Swift Programming Language Evolution

#68
post #42

Earlier quoted context omitted.

Fortran especially. Forth seems to depend on processor characteristics. I seem to remember that Ada compilers routinely produce faster code than C compilers.

C has very loose semantics that make it difficult for a compiler to reason about code, as the saying goes, C is often little more than portable assembly. There's a reason that CLion was a big deal when JetBrains announced it, reasoning about C/C++ code is HARD.

If I wasn't more interested in Agent oriented languages, it might be interesting to see what could be done to design a new language built for performance. I would imagine you'd start with the Ada side of the house and work your way back to more pleasing syntax.

Re: Swift Programming Language Evolution

#69
post #19

So Swift has been out awhile, what do people think of it? What other language would you compare it to (e.g. C#, C, C++, etc)? What about the libraries are they well laid out?

I tried it an pretty quickly went back to C#. The Apple-only nature was the major downside to me, so maybe these kinds of changes will help (assuming it sees wide adoption outside of Apple-land). Check your local job boards, but if sell yourself as a Swift dev you're likely to be pigeon-holed into Apple-centric development for the foreseeable future. With Apple sales and market share dropping like a rock in the last…

Completely false.

Neither sales nor market share have been dropping like a rock.

Apple had had their first year on year revenue decline in 13 years of continuous growth, but there is no indication that that anything is 'dropping'.

Re: Swift Programming Language Evolution

#70
post #36

Am I the only one as a JS dev, who find it hard with types & casting in Swift?

Probably not. Types and casting seem complex to people coming from more dynamic languages – that's okay though! It formalises something that you generally don't have to think about in Javascript – the tradeoff being that you have more consistent, less buggy software at the expense of more effort while writing it.

Agreed. I am yet to formally make my app available but had tough times mainly while doing Ajax calls, typecasting the JSON i got. Infact took time to understand some concepts like ARC, Optional Chaining when you are from JS background.
Post reply on HN