Live data from Hacker News

Closing this as we are no longer pursuing Swift adoption

github.com

151–160 of 332 posts

Re: Closing this as we are no longer pursuing Swift adoption

#151
post #60
post #51

Earlier quoted context omitted.

Swift actually has excellent C++ interop [1] (compared to other languages, but, I guess, not good enough for Ladybird). [1] https://www.swift.org/documentation/cxx-interop/

I actually looked into that recently (calling C++ from Swift), and I was surprised by the amount of limitations. Said differently: the C++ interop did not support calling the C++ library I wanted to use, so I wrote a C wrapper.

Binding to C++ is an extremely difficult and complex problem for any language that is similarly rich and has lots of (seemingly) equivalent features. The number of subtle incompatibilities and edge cases becomes nearly endless. It's not surprising that some C++ code can't be bound properly.

Re: Closing this as we are no longer pursuing Swift adoption

#152
post #118

Earlier quoted context omitted.

>> some teams are just not permitted to contribute to OSS in any way My understanding is that by default you are not allowed to contribute to open-source even if its your own project. Exceptions are made for teams whose function is to work on those open-source project e.g. Swift/LLVM/etc...

I talked to an apple engineer at a bar years ago and he said they aren’t allowed to work on _anything_ including side projects without getting approval first. Seemed like a total wtf moment to me.

I have never had a non wtf moment talking to an apple software engineer at a bar.

I can recall one explaining to me in the mid 20 teens that the next iPhone would be literally impossible to jailbreak in any capacity with 100% confidence.

I could not understand how someone that capable(he was truly bright) could be that certain. That is pure 90s security arrogance. The only secure computer is one powered off in a vault, and even then I am not convinced.

Multiple exploits were eventually found anyway.

We never exchanged names. That’s the only way to interact with engineers like that and talk in real terms.

Re: Closing this as we are no longer pursuing Swift adoption

#153
post #86

Earlier quoted context omitted.

For what it’s worth, ObjC is not Apple’s brainchild. It just came along for the ride when they chose NEXTSTEP as the basis for Mac OS X. I haven’t used it in a couple decades, but I do remember it fondly. I also suspect I’d hate it nowadays. Its roots are in a language that seemed revolutionary in the 80s and 90s - Smalltalk - and the melding of it with C also seemed revolutionary at the time. But the very same featu…

Many of the built-in types in Objective C all have names beginning with “NS” like “NSString”. The NS stands for NeXTSTEP. I always found it insane that so many years later, every iPhone on Earth was running software written in a language released in the 80s. It’s definitely a weird language, but really quite pleasant once you get used to it, especially compared to other languages from the same time period. It’s truly…

>It’s truly remarkable they made something with such staying power

What has had the staying power is the API because that API is for an operating system that has had that staying power. As you hint, the macOS of today is simply the evolution of NeXTSTEP (released in 1989). And iOS is just a light version of it.

But 1989 is not all that remarkable. The Linux API (POSIX) was introduced in 1988 but started in 1984 and based on an API that emerged in the 70s. And the Windows API goes back to 1985. Apple is the newest API of the three.

As far as languages go, the Ladybird team is abandoning Swift to stick with C++ which was released back in 1979. And of course C++ is just an evolution of C which goes back to 1972 and which almost all of Linux is still written in.

And what is Ladybird even? It is an HTML interpretter. HTML was introduced in 1993. Guess what operating system HTML and the first web browser was created on. That is right...NeXTSTEP.

Re: Closing this as we are no longer pursuing Swift adoption

#155
post #86

Earlier quoted context omitted.

Many of the built-in types in Objective C all have names beginning with “NS” like “NSString”. The NS stands for NeXTSTEP. I always found it insane that so many years later, every iPhone on Earth was running software written in a language released in the 80s. It’s definitely a weird language, but really quite pleasant once you get used to it, especially compared to other languages from the same time period. It’s truly…

>It’s truly remarkable they made something with such staying power What has had the staying power is the API because that API is for an operating system that has had that staying power. As you hint, the macOS of today is simply the evolution of NeXTSTEP (released in 1989). And iOS is just a light version of it. But 1989 is not all that remarkable. The Linux API (POSIX) was introduced in 1988 but started in 1984 and b…

[deleted]

Re: Closing this as we are no longer pursuing Swift adoption

#156

Earlier quoted context omitted.

For what it’s worth, ObjC is not Apple’s brainchild. It just came along for the ride when they chose NEXTSTEP as the basis for Mac OS X. I haven’t used it in a couple decades, but I do remember it fondly. I also suspect I’d hate it nowadays. Its roots are in a language that seemed revolutionary in the 80s and 90s - Smalltalk - and the melding of it with C also seemed revolutionary at the time. But the very same featu…

I've never written whole applications in ObjC but have had to dabble with it as part of Ardour (ardour.org) implementation details for macOS. I think it's a great language! As long as you can tolerate dynamic dispatch, you really do get the best of C/C++ combined with its run-time manipulable object type system. I have no reason to use it for more code than I have to, but I never grimace if I know I'm going to have t…

It is, and that’s part of what I loved about it. But it’s also the kind of trick that can quickly become a source of chaos on a project with many contributors and a lot of contributor churn, like we tend to get nowadays. Because - and this was the real point of Dijkstra’s famous paper; GOTO was just the most salient concrete example at the time - control flow mechanisms tend to be inscrutable in proportion to their power.

And, much like what happened to GOTO 40 years ago, language designers have invented less powerful language features that are perfectly acceptable 90% solutions. e.g. nowadays I’d generally pick higher order functions or the strategy pattern over method swizzling because they’re more amenable to static analysis and easier to trace with typical IDE tooling.

Re: Closing this as we are no longer pursuing Swift adoption

#157
post #60
post #51

Earlier quoted context omitted.

Swift actually has excellent C++ interop [1] (compared to other languages, but, I guess, not good enough for Ladybird). [1] https://www.swift.org/documentation/cxx-interop/

I actually looked into that recently (calling C++ from Swift), and I was surprised by the amount of limitations. Said differently: the C++ interop did not support calling the C++ library I wanted to use, so I wrote a C wrapper.

I did this a long time ago as Swift calling Objective-C++ which can call C++ libs, in that case OpenCV. So it wasn't awful but did require making an ObjC++ wrapper, unless I did something wrong which is also possible.

Re: Closing this as we are no longer pursuing Swift adoption

#158

Earlier quoted context omitted.

For what it’s worth, ObjC is not Apple’s brainchild. It just came along for the ride when they chose NEXTSTEP as the basis for Mac OS X. I haven’t used it in a couple decades, but I do remember it fondly. I also suspect I’d hate it nowadays. Its roots are in a language that seemed revolutionary in the 80s and 90s - Smalltalk - and the melding of it with C also seemed revolutionary at the time. But the very same featu…

Next was more or less an Apple spinoff, that was later acquired by Apple. Objective-C was created because using standards is contrary to the company culture. And with Swift they are painting themselves into a corner.

> Objective-C was created because using standards is contrary to the company culture

Objective-C was actually created by a company called Stepstone that wanted what they saw as the productivity benefits of Smalltalk (OOP) with the performance and portability of C. Originally, Objective-C was seen as a C "pre-compiler".

One of the companies that licensed Objective-C was NeXT. They also saw pervasive OOP as a more productive way to build GUI applications. That was the core value proposition of NeXT.

NeXT ended up basically taking over Objective-C and then it became of a core part of Apple when Apple bought NeXT to create the next-generation of macOS (the one we have now).

So, Objective-C was actually born attempting to "use standards" (C instead of Smalltalk) and really has nothing to do with Apple culture. Of course, Apple and NeXT were brought into the world by Steve Jobs

Re: Closing this as we are no longer pursuing Swift adoption

#159
post #83

Earlier quoted context omitted.

This experiment has shown that both are actually bad choices.

Oh? They tried rust? Lots of people seem really committed to OOP. Rust is definitely a bad fit if you can't imagine writing code without classes and objects. I don't think this makes rust is a bad language for the problem. Its just, perhaps, makes rust a bad language for some programmers.

It doesn't seem uncommon for someone to generally like Rust but still want to use something OO for UI. I'm in that boat. Never liked OOP much, but it makes sense sometimes.

Re: Closing this as we are no longer pursuing Swift adoption

#160
post #30

Earlier quoted context omitted.

Swift never felt truly open source either. That people can propose evolution points doesn’t change the fact that Apple still holds all the keys and pushes whatever priorities they need, even if they’re not a good idea (e.g. Concurrency, Swift Testing etc) Also funny enough, all cross platform work is with small work groups, some even looking for funding … anyway.

> Swift never felt truly open source either. Apple has been always 'transactional' when it comes to OSS - they open source things only when it serves a strategic purpose. They open-sourced Swift only because they needed the community to build an ecosystem around their platform. Yeah, well, sure they've done some work around LLVM/Clang, WebKit, CUPS, but it's really not proportional to the size and the influence they…

WebKit started as a fork of the KHTML and KJS libraries from KDE.
Post reply on HN