Hacker Newsnew | past | comments | ask | show | jobs | submit | ardit33's commentslogin

I hate how pendantic and useless some of the features of swift being pushed down by academics that don't write apps or services themselves.

Simple example:

Objective-C

if myObject {

}

in swift if myObject != nil {

}

Also opitionals in swift could have totally be avoided if they adopted a prototype based langue (basically object are never nil). Lua did this, and it is very elegant

But meanwhile, we got a half backed optional system, which is backwards (similiar to Java), and didn't help with the practicality of the language at all, and meanwhile you still can crash an app doing myArray[1]


I love Obj-C, but the Swift version isn't as bad as you say:

    if let myObject {
        // myObject is non-nil in here
    }
The Swift version is also usingfirst-class optionals. In Obj-C there is very small chance you'll confuse `NULL` with `nil` or `0`. Or that you'll message `nil` resulting in `nil`.. and in well-built software you have to guard against that.

Aside: Obj-C is narrowly focused on adding objects (in the Smalltalk sense) to C whereas Swift is trying to deliver a compiler and language with memory safety _guarantees_... Turns out that means you need a lot more language. Not to mention the `async` syntax/feature explosion.

Obj-C is "hippie" and Swift is "corporate suit" + "we're doing serious work here!"

Finally I want to say: I believe Obj-C was a huge competitive advantage and secret weapon that let Apple deliver an OS with so much more built-in functionality than any competitor for years and years. (Obj-C is great for system APIs) That's under-appreciated.


  > you still can crash an app doing myArray[1]
the first thing i do when starting a new project:

  extension Array {
      subscript(safe: Int) -> Element? { ... }
  }
there was talk in the swift forms about adding that as standard that but it seems to have died off...

[0] https://forums.swift.org/t/draft-adding-safe-indexing-to-arr...


Even with that there is nothing from you accidentally using [i]. Also there are just a ton of Swift APIS and bridge API that take an index and then crash… for full coverage you would need hundreds of safe wrappers… (doing what you propose though at least gives you. Some peace of mind..

Also Swift has a lot of other areas where it just lacks any safeguards… Memory issues are still a thing. It’s using ARC under the hood after all.

Infinite recursion is still a thing (not sure if this would even detectable - probably not).

Misuse of APIs.

And it introduces new issues: which methods are being called depends on your imports.

In my experience Swift lulls you into a false sense of safety while adding more potential safety issues and “only” solving some of the less important ones. objc has null ability as well. Which can warn u if used appropriately. objc also has lightweight generics. In practice this is all you need.


  > And it introduces new issues: which methods are being called depends on your imports.
also depending on how you casted it, it will call the method of the cast, not the actual one in the instance (which completely caught be off-guard when i started swift)

  > objc also has lightweight generics. In practice this is all you need.
i feel this too sometimes; sometimes simple really is best... tho i think some of these decisions around complexity is to allow for more optimization so c++ can be chucked away at some point...

Such a mess. You can tell the people that designed it never wrote a client or an app in their lives. It is pure academic pendatry in display.

This was doesn't benefit the US whatsoever. I am getting tired of our taxes going to another useless war, like the Iraq one, that only benefits a foreign entity, aka Israel.

Iran could have been contained and Obama was right on his approach. We don't know the details of the strikes, but I hope it doesn't go into a full blown war, but this will be another Iraq like disaster, and american people are getting tired of doing the bidding of Isreal, a country that is already mirred into doing a genocide. This war is already unpopular in pools. Iran's regime is terrible to its people, but this has the potential to be another disaster where countless of people could die.


>We don't know the details of the strikes, but I hope it doesn't go into a full blown war

Well, if the Chinese are smart, they will capitalize on this opportunity. They can prop up the Iranian regime with intelligence, weapons, and financial support the same way US & EU prop up Ukraine. The purpose would be to bleed US munitions stocks even faster than they already are, as well as increase attritional losses in platforms and personnel. China's stranglehold on rare earths and their export restrictions are making it more difficult for the US to restore its weapons stockpile. I'm sure China can crunch some numbers to identify the point of maximum weakness if the US is forced to sustain an anti-Iran air and naval campaign 30/60/90+ days. Then Xi can try to overlap that window of weakness with one of the two invasion windows against Taiwan (mostly due to weather in the Taiwan Strait). I don't think the PLA is dumb enough to try a full amphibious assault, but they could definitely initiate their blockade then.


I don’t believe China has any intention to support anyone by military means. Best case they will keep on trading and that’s it. Iran is alone. Maybe Turkey makes a crazy move to support seeing it sees itself as next in line if Iran falls. This is the biggest present to European powers, which I think will be hoping that it will keep US busy for rest of Trump’s presidency. They have the Ukraine excuse to distance themselves and let everyone get weaker while they arm themselves up. Internal political tensions in US will also give them leeway to more actively influence American politics and these will be even worse with a long war pitched against a scandal background. Then again, Trump may be a genius, get this done in a couple of months and leave everyone grasping for a new strategy.


It would take weeks for China to shop stuff. (Unless they have done their homework in advance)


There's been rumors of Chinese kit arriving in Iran, but nothing concrete:

https://moderndiplomacy.eu/2026/02/10/how-iran-gained-the-ab...

If China didn't anticipate the US attacking Iran after Maduro was deposed and the resulting impacts on their oil supplies, then they are asleep at the wheel.


indeed. One of the only positive things Obama did internationally.

The regime may be horrific, but the only route out was through supporting and encoraging change and opening up and progressive forces.

It's a country with 90 million people, and many groups and external influences. Could end up like Iraq.

and it's Europe that will experince the political chaos as result of pressure from refugees, not the US.


It won't go to a full blown war. They will bomb some stuff and declare victory. Once they sailed two carrier battle groups over there an attack of some sort was a foregone conclusion.


lol we all hope


If they don’t put boots on the ground, it won’t. They can bomb Iran back to the stoneage, as it has no viable air defenses.


I guess countless Iranians dying in the process doesn’t matter at all? As long as the Americans are killing them from far away, it’s all good?


Isn't it always this to be the case?

> Iran could have been contained and Obama was right on his approach.

So you don't care about people forced to live under IRGC rule and their desire to export their Islamic ideals elsewhere?


Do you really believe this “altruistic” angle?


Yes, I don't want to live under Islamic rule.


I might be convinced that the Administration was concerned about people being forced to live under Islamic rule if it was as eager for war with Saudi Arabia as it is with Iran.

(I wouldn't support it any more in that case, but I would be more inclined to believe that its motivation might actually have anything to do with "Islamic rule".)


Many people want to though, and no one is forcing you to.


Where do you live where Islamic rule is a worry?


Note how they won't answer. They're affected by media FUD.


No. There are dozens of countries with despotic regimes, including Israel. And I also have no interest in zionist or any religious ideals exported either. If this were justification we would also be bombing Israel, which has committed far worse crimes than Iran.


lol... people that complain about XCode don't know how well they have compare to what it was before.

I started my work on the J2ME era as well. Had to use textpad for development, and maybe eclipse at some point (which was pretty decent). Tools and simulators were all over the place.


Ever done BlackBerry development?

It’s so funny when people complain about the $99 fee for the Apple development program being developer-unfriendly. Back in the day, RIM/BlackBerry wasn’t so much developer-unfriendly as much as actively hostile towards developers. Basically, if you weren’t a fortune 500 company you could fuck right off.


I have a 39" (almost 40") LG ultrawide, and it is the perfect size. Can't see how a larger monitor would fit a normal desk...

BUT.... this is perfect for folks that want to use one monitor for both work, and as/for entertainment /just normal tv watching in a living room.


I am in Miami right now, and verizon is not working here. (I get the SOS sign).


KONAMI's PES (Pro Evolution Soccer) - (or Winning Eleven as it was called originally), has always had better gameplay. What it suffered was lack of liseneces.

Now it is free and called eFootball... and obviously not that same, but PES has always been the favorite of fans gameplay wise.


They say to replace them with Banners, which are just a different style of a "Toaster", just usually stay longer, or are permanent until the user takes an action.


No, it's different. A "toast" is a floating element, a "push notification" which is detached from the panel, e.g. can disappear quite quickly. The banner is placed closest to the context where the action is triggered, e.g. might require the user to close it. If you have some disability, e.g. cognitive, visual or motor, it's likely to be easier to perceive the information. When a user creates an "issue", the "issue item" is displayed in the list, meaning that you won't need a secondary notification process.


The main problem with toasts is that they disappear with no hope of recovery before you get a chance to read them, obscuring other content in the process. Banners don't obscure other content, don't disappear without user action, and could theoretically have a message history.


Oh, dang.... the great 2030 pandemic is coming...

I don't think this bodes well for the future. Both rats and bats have been huge vectors of diseases. This is going to produce some kind of super virus that will be another middle age plague like pandemic.


This probably isn't new behavior, simply something we're witnessing for the very first time.

We haven't observed orcas predate moose or primates, but the former has plenty of supporting evidence and the latter has probably happened at some point.

In any case, zoonotic reservoirs likely slosh around a lot more than we think before spillover events.


2/3rds of all human pathogens originated from zoonotic spillover!

https://pmc.ncbi.nlm.nih.gov/articles/PMC8182890/


We also pass on diseases to animals so it is a never-ending cycle.


I agree. This has probably been happening for millions of years. Bats often live in dense colonies in caves and tree trunks with small exits making rat predation possible.

Some native Arctic peoples have traditions of killer whales eating people, although officially they have only killed people while in captivity. A person in a skin kayak would be easy prey for one.


Apple Silicon was started by/during the Steve Jobs era in 2010. You seeing the rewards now (well starting in 2019), because it takes so long to produce a chip.


Apple Watch was also started under Jobs


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: