TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Swift: Not quite there, but too far gone too

32 pointsby neopalmost 11 years ago

10 comments

mamcxalmost 11 years ago
I start writing a ORM (that is how I learn a new language). Very fast I hit problems. The keynote and the state of union say swift is ready for production, but is not there yet. The coding experience is buggy, the repl violate the language (is possible to change a constant to another type!), the importing of other obj-c code is sometimes broken (ie: Not work at all, or yes). A lot of things are not documented (For example, how do a generator?), etc<p>Still, I hope this lang mature and be popular, because I want badly to not use obj-c
评论 #7847602 未加载
评论 #7847337 未加载
neopalmost 11 years ago
The article suffers from a bit from looking at things from a strictly theoretical knowledge (i.e. the first example is not valid Swift code), but it does bring up a few interesting points.
lobster_johnsonalmost 11 years ago
I agree that instances being pass-by-reference is weird, with everything else having copy semantics. It seems as yet another odd artifact of the design constraint that Swift must be ObjC-runtime compatible.<p>I sort of wish they had created a special type annotation to support legacy ObjC classes, and gone for Go-style structs for the non-legacy OO.
评论 #7847186 未加载
josephlordalmost 11 years ago
&gt; Except that you can still make changes that don’t affect length (immutArray[3] = &quot;Whoopsie&quot;)<p>That sounds like a bug to me. I would expect the compiler to detect it as an error (it doesn&#x27;t). Can anyone point me to the relevant bit of the spec that says you can do that?
评论 #7847640 未加载
andrewflnralmost 11 years ago
Optional types are not the only use of algebraic data types. I agree that it&#x27;s weird to have them and optional operators in the same language, but I don&#x27;t see it as a big issue.
TwistedWeaselalmost 11 years ago
&quot;... but this language, once released, will be fixed for a decade at least. Something with that lifespan should be great from day one.&quot;<p>I&#x27;m not sure why the author believes that once the language ships it cannot change. Surely all languages evolve and change over time, it would be foolish to think Swift as it ships in September will not change for a decade after that.
评论 #7847359 未加载
评论 #7847395 未加载
评论 #7847419 未加载
Kiroalmost 11 years ago
I don&#x27;t understand the obsession with mutability. When is it a problem that a variable is mutable?
评论 #7847366 未加载
评论 #7847336 未加载
评论 #7847345 未加载
评论 #7847318 未加载
评论 #7847367 未加载
AshFurrowalmost 11 years ago
&gt; So this is a list of things I don’t like about Swift based on things I’ve read in the book, without having experimented with the language myself.<p>I stopped reading about here.
评论 #7848741 未加载
_random_almost 11 years ago
The good part is that the following smooth transition is now possible for the core iOS developers:<p>ObjectiveC -&gt; Swift -&gt; C#: iOS, Android, Windows Phone etc.
sbukalmost 11 years ago
FTFA;<p>&gt;<i>&quot;So this is a list of things I don’t like about Swift based on things I’ve read in the book, without having experimented with the language myself...&quot;</i><p>Question; why post this then?
评论 #7848143 未加载
评论 #7847560 未加载