7 ms·
Yikes. Swift is becoming horribly complex and opaque. Yet another set of @shoehornedKeywords... Colored functions... Let me ramble a bit here. Apple’s platfor
by layoutIfNeeded 6y ago
Yikes. Swift is becoming horribly complex and opaque. Yet another set of @shoehornedKeywords... Colored functions...
Let me ramble a bit here.
Apple’s platforms had always put users before developers, that’s why they were so successful. They’ve built the best user experience by far using nothing but a simple Smalltalk-esque language from the 80s. Look at their frameworks: CoreAudio, CoreAnimation, UIKit... Tremendously powerful, and the best in their league - in terms of possibilities, not necessarily developer experience! Others were shoving garbage-collected virtual machines in their devices, piling abstraction over abstraction, “fluent APIs” (remember those?); meanwhile Apple built an empire with this quirky dynamic language (plus some C++ under the hood), where you had to do manual reference counting as late as 2012! Developers were livid. “How am I supposed to program in this weird language?” “AutoLayout? Why can’t it be just like CSS or something??”
But Apple didn’t give a shit, they knew their platform, their frameworks were the best, period. And whiny devs had to adapt to gain access to the richest cohort of users in the computing landscape.
With Swift and SwiftUI we seem to be heading towards a different future, and I’m yet to be convinced that it’s the right one.
- IfOnlyYouKnew 6y ago> And whiny devs had to adapt to gain access to the richest cohort of users in the computing landscape > With Swift and SwiftUI we seem to be heading towards a different future, and I’m yet to be convinced that it’s the right one. The more things change, the more they stay the same...
- marketingPro 6y agoWhat makes you think "They’ve built the best user experience by far" I can't even say "best" experience let alone "by far". Apple is notoriously anti consumer on everything from hardware to software. I don't know what you are talking about. They had a fun signup screen when you first boot your iPhone. I have 0 ideas what you are talking about for macOS. I think their primary reason for success was their advertising/marketing.
- deleted 6y ago[deleted]
- Razengan 6y ago> Apple is notoriously anti consumer on everything from hardware to software. Yet millions of people continue to happily give them money without being forced to, unlike say Microsoft or Google that you just cannot avoid even if you don't own any of their products. I was a Windows/PC user for most of my life before I switched to Macs and in my experience Apple has been consistently more consumer-friendly than Microsoft or Google. In fact my first foray into the Apple ecosystem was an iPad that I bought as a gift for someone, and fell in love with it so much I wanted to develop for iOS and bought my very first Mac for that. So far nothing has made me consider switching to Microsoft or Google. The only thing I hate about Apple is their poor documentation and lack of official support on their own forums.
- marketingPro 6y agoAs someone that used both, I think you are under the psychology spell. It's not like you could leave Apple, you are locked in. It may be hard to put into words why you feel that way. (which is why your post never mentioned anything about quality) As mentioned opening the iphone box and giving Apple my personal information felt fantastic. The actual performance and quality was extremely dissapointing.
- Razengan 6y ago> As someone that used both, I think you are under the psychology spell. One could say the same for you, but that won't get us anywhere. > It's not like you could leave Apple, you are locked in. I have lived most of my life without Apple and I know how to do it again. Tell me, how do you avoid Google or Microsoft? I was happily using GitHub before Microsoft bought it. I was happily using YouTube before Google bought it and made it worse. I can't avoid feeding my data to Google even if I don't use any of their services, through their Ads, Analytics etc. and who knows what kind of shadow profiles they build from just my proximity to their other users. Now, every time I sign into YouTube I have to delete all Google cookies to avoid being automatically signed into Search. > As mentioned opening the iphone box and giving Apple my personal information felt fantastic. The actual performance and quality was extremely dissapointing. I've been using the iPhone since the 5S and honestly, every time I have to handle someone's Android (e.g. to show them how to do something quicker than telling them), I want to hand it back as soon as possible.
- novok 6y agoAutolayout vs CSS is just a trade off on what layout algo you want. Haversine layout systems tend to be more computationally inefficient than flexbox actually, but more powerful. Yes the original programming API was horrible, but that was a quirk about how apple does API review, and they were mostly expecting you to use IB to do your autolayouts, and stuff like SnapKit put a sane API on top of it soon after. TBH Obj-C once you looked past it's ugly syntax is a better developer experience than swift today if your making large-ish apps. Today the debugger is still buggy, build times are still way slower and swift code bases create stutters in unresponsiveness inside Xcode to this day. And it was way worse back in the swift v1-3 days. TBH I think swift could solve a lot of their build speed issues if they removed type inference beyond a very basic set and brought back fine file grained importing like you have with C and Java. You still get %95 the benefits with a couple of features that most IDEs like IntelliJ with java are shown to be NBD. Stuff like Flutter & Kotlin Multiplatform might make a lot of this stuff moot although, and swift will be regulated as an iOS compatibility layer and a nicer looking C++
- rudedogg 6y ago> Haversine layout systems tend to be more computationally inefficient than flexbox actually, but more powerful. I think you meant Cassowary instead of Haversine: https://en.wikipedia.org/wiki/Cassowary_(software) https://en.wikipedia.org/wiki/Cassowary_(software)
- novok 6y agooops, brainfart :)
- andrekandre 6y ago> With Swift and SwiftUI we seem to be heading towards a different future, and I’m yet to be convinced that it’s the right one. i have some feelings myself, but they are badly formulated so i wont say them here... but im curious, specificaly why do you feel this way?
- layoutIfNeeded 6y agoThey are mixing up their priorities. SwiftUI is catering to the mediocre webdev demographic, with a lot of opaque magic and language-level (!) hacks only for the sake of a “friendly” React-like API. In terms of features and performance it’s way behind UIKit, yet Apple is pushing it for the new iOS 14 home screen widgets. It’s basically the usual story with post-Jobs Apple: catering for the masses while neglecting the pros - but this time it’s about developers instead of consumers.
- pjmlp 6y agoActually reactive UIs trace back to Haskell and FP reactive programming concepts.
- layoutIfNeeded 6y agoSure, I’m familiar with Conal Elliott’s work. But other than its “elegance”, I don’t hold reactive programming in particularly high regard, especially when implemented on top of non-pure languages. I consider FRP a “clever” technique - and while “clever” techniques make programming a fun puzzle, they can be detrimental to performance and end-user experience. We have a finite cleverness budget; if you spend it on your code, then your product will suffer. If you build cleverness into the platform SDKs (hello SwiftUI! hello J2EE design pattern hell!), then every product on your platform will suffer.
- pjmlp 6y agoJ2EE has stopped being a thing in 2005, and I am quite found of JEE, so I like to use my cleverness budget. As for SwiftUI, I guess the only issue it the current state of its tooling, as I have heard it still is found lacking. Yet if one listens to iOS podcasts everyone is raving about it.
- icedchai 6y agoFunny, I started with iOS development in 2008. I haven't done much recently, but laying things out with UIKit always felt pretty sensible to me. CSS, not so much. CSS was always the "WTF" of development. Maybe it's better now with Flexbox.
- breakfastduck 6y agoGlad to see a mention of CoreAudio for once in a public forum. No matter the value for money or compatibility, I will never leave macOS for windows because of it. I bought a hugely powerful windows PC in 2018 and the audio performance is awful compared to a 2011 macbook and my 2019 macbook is on another level. Windows lack of attention to audio drivers is frankly staggering. CoreAudio 'just works'.
- pjmlp 6y agoI never had audio issues on MS-DOS/Windows, unless we are speaking about the pre-Sound Blaster/AdLib days. Maybe pay better attention to the sound hardware next time?
- ratww 6y agoThis really depends on your needs. For music production things are different in Windows. Due to latency, studio-level hardware vendors completely skip Microsoft's audio stack and use something that talks directly to the card called ASIO. So, you kinda need external audio hardware even if you're on-the go and wants to do some low-latency audio. Or you use hacks like Asio4all to achieve low latency. In macOS CoreAudio has low latency even if you use the built-in 3.5mm audio jack.
- breakfastduck 6y agoExactly - it really is a big advantage to have that performance natively. There’s a reason external hardware drivers are native on macOS.
- breakfastduck 6y agoI have significant professional experience in audio engineering so let’s skip the petty rhetorical questions. Windows audio drivers are so poor that they’re bypassed completely and basically all major hardware producers offer either ASIO drivers on windows or native CoreAudio drivers. Using the same high quality external sound card, I get better performance on macOS with latency and buffer than I do on a windows machine with significantly ‘better’ hardware. I know full well sound hardware makes a difference, and macOS and CoreAudio interfaces with said hardware significantly better than windows. There’s a reason producers of pro audio interfaces write their drivers natively for macOS and use ASIO for windows. I’m talking about pro audio production tools here, not playing a few mp3s.
- wayneftw 6y ago> They’ve built the best user experience by far... ...in your opinion. In the opinions of people who manage IT for the vast, vast majority of businesses around the world, where most of the serious software users exist, that title belongs to Microsoft Windows. Apple is so overtly anti-consumer that I just can’t take opinions like this seriously. And Swift is a trash language with a shitty developer experience just like Obj-c was before it. They couldn’t even get strings right. Nobody wants it outside of Apple’s little bubble.
- pjmlp 6y agoWhat developers? Web developers trying to do native stuff, maybe. Give me a native project over Web stuff any day of the week and I up for grabs, yet I do Web related projects since 1999. Objective-C and Cocoa is great compared with the chaos of npm, yeoman, babel, node, deno, coffeescript, Typescript, bucklescript, angular, react, ember, dojo, prototype.js, jQuery, Vue, svelte, scss, and whatever someone comes up next month to improve their CV. I am so happy that thanks to WebAssembly I am getting Flash back.