News for hackers. Stuff that matters.
Re:Swift Evolution: Actors by sai_c on Wednesday March 17, 2021 @02:14AM (#26487219)
Every time I read about new Swift features, I'm reminded of this paragraph from Aaron Hillegass's book "Cocoa Programming for Mac OS X". I don't know why.

    Once upon a time, there was a company called Taligent, which was created by IBM and Apple to develop a set of    
    tools and libraries like Cocoa. About the time Taligent reached the peak of its mindshare, I met one of its 
    engineers at a trade show. I asked him to create a simple application for me: A window would appear with a  
    button, and when the button was clicked, the words "Hello, World!" would appear in a text field. The engineer 
    created a project and started subclassing madly: subclassing the window and the button and the event handler. 
    Then he started generating code: dozens of lines to get the button and the text field onto the window. After 45 
    minutes, I had to leave. The app still did not work. That day, I knew that the company was doomed. A couple of years   
    later,Taligent quietly closed its doors forever.
Re:Swift Evolution: Actors by BakaRakuda on Wednesday March 17, 2021 @05:44AM (#26488704)
You can literally create the app described in his quote in about 2 minutes flat with the following lines of code...

  import SwiftUI

  @main
  struct FooApp: App {
 @State private var isClicked: Bool = false
 var body: some Scene {
  WindowGroup {
   VStack {
    Button("Click me!") { isClicked.toggle() }
    if isClicked { Text("Hello, World!") }
   }.frame(width: 640, height: 480)
  }
 }
  }
Re:Swift Evolution: Actors by skohan on Wednesday March 17, 2021 @07:54AM (#26489790)
Even in the objc-cocoa days, you could create a .xib, drag a few connections, and have this working with 10 lines of code (8 of which generated automatically by XCode)
Re:Swift Evolution: Actors by pindab0ter on Wednesday March 17, 2021 @02:42AM (#26487354)
It’s a funny excerpt, but I don’t see how it’s relevant to this. It seems to me that the whole point of introducing actors is to reduce complexity.
Re:Swift Evolution: Actors by midgetjones on Wednesday March 17, 2021 @05:31AM (#26488557)
The main moral of this story is that people like to claim hindsight for some sort of psychic power.
Re:Swift Evolution: Actors by sai_c on Wednesday March 17, 2021 @02:55AM (#26487435)
As I said, I really can't put my finger on it, but maybe it is this (tongue in cheek).

    Taligent: The whole point of adding all those abstractions is to reduce complexity.
Re:Swift Evolution: Actors by mpweiher on Wednesday March 17, 2021 @04:05AM (#26487822)
One of the funny things about our industry is that when our smartest really give their best to do The Right Thing™, we get Taligent and Swift.

And when people do everything "wrong", we get amazing things like Smalltalk and Cocoa.

Hmm...

Re:Swift Evolution: Actors by djxfade on Wednesday March 17, 2021 @04:58AM (#26488234)
What's wrong with Swift? It's a massively popular language
Re:Swift Evolution: Actors by alfonsodev on Wednesday March 17, 2021 @05:59AM (#26488834)
Remember Swift is also used in the backend and other areas that are not UI, not every new feature in Swift will be oriented to make UI apps easier, for that you have Swift UI the framework.

We don't get this type public proposals for Swift UI, I wish Swift UI would be open source, because the documentation hasn't been great in my experience and at least this type of proposals get publicly documented and discussed before being implemented.

Re:Swift Evolution: Actors by bigbizisverywyz on Wednesday March 17, 2021 @07:50AM (#26489756)
Funnily enough I just recalled this quote recently when casually looking over this page about WinUI3 : https://docs.microsoft.com/en-us/windows/apps/winui/winui3/x...

The whole XAML/WPF thing just seem to me a bit of a dig's dinner.