Re: Need for Swift

2019-10-16 Thread Charles Srstka via Cocoa-dev
> On Oct 16, 2019, at 2:38 PM, Jean-Daniel via Cocoa-dev > wrote: > >> Le 16 oct. 2019 à 11:49, Stephane Sudre via Cocoa-dev >> mailto:cocoa-dev@lists.apple.com>> a écrit : >> >> On Tue, Oct 15, 2019 at 2:26 PM Sandor Szatmari via Cocoa-dev >> mailto:cocoa-dev@lists.apple.com>> wrote: >> >>>

Re: Need for Swift

2019-10-16 Thread Jean-Daniel via Cocoa-dev
> Le 16 oct. 2019 à 11:49, Stephane Sudre via Cocoa-dev > a écrit : > > On Tue, Oct 15, 2019 at 2:26 PM Sandor Szatmari via Cocoa-dev > wrote: > >> But honestly, I don’t have enough Swift experience to know if you can write >> bad Swift code. > > I'm just reading Swift code here and there

Re: Need for Swift

2019-10-16 Thread Alex Zavatone via Cocoa-dev
> On Oct 16, 2019, at 4:49 AM, Stephane Sudre via Cocoa-dev > wrote: > > Why do Swift developers think it's mandatory to write code that is illegible? > Is Swift mainly used by freelances or consultants that will not have > to maintain the software? The zest to do things in a way, “because it

Re: Need for Swift

2019-10-16 Thread Stephane Sudre via Cocoa-dev
On Tue, Oct 15, 2019 at 2:26 PM Sandor Szatmari via Cocoa-dev wrote: > But honestly, I don’t have enough Swift experience to know if you can write > bad Swift code. I'm just reading Swift code here and there and it's my personal opinion that 75% of the Swift code I read is bad code. By bad cod

Re: Need for Swift

2019-10-15 Thread Alex Zavatone via Cocoa-dev
> On Oct 15, 2019, at 6:08 PM, Charles Srstka via Cocoa-dev > wrote: > > Seeing lots of `!` in production Swift is a code smell. > > Charles I wouldn’t call it a code smell. It’s worse. It’s actually asking for a crash if everything doesn’t work out perfectly and an expected result is nil

Re: Need for Swift

2019-10-15 Thread Greg Weston via Cocoa-dev
> This discussion about Swift vs Objective-C is interesting, but I think it > omits something important. Both those languages only build apps for Apple > products. This was probably “omitted” because it’s not actually true. ___ Cocoa-dev mailing list (

Re: Need for Swift

2019-10-15 Thread Jens Alfke via Cocoa-dev
> On Oct 15, 2019, at 10:52 AM, Turtle Creek Software > wrote: > > Diving down into C sounds like a reasonable option for a database library. > It does not sound good for a specialty app that does construction estimating > and accounting. I don't see the difference, for the purposes of thi

Re: Need for Swift

2019-10-15 Thread Charles Srstka via Cocoa-dev
> On Oct 14, 2019, at 10:44 PM, Laurent Daudelin via Cocoa-dev > wrote: > > Are people supposed to know instinctively when you unwrap with “?” and when > you do with “!”? It’s quite simple; you nearly always unwrap with `?`. The tiny minority of the time that `!` is needed is when you *know*

Re: Need for Swift

2019-10-15 Thread Alex Zavatone via Cocoa-dev
Sent from my iPhone > On Oct 15, 2019, at 7:25 AM, Sandor Szatmari > wrote: > > Obj-C represents the freedom for me to write bad code if I need to… Believe me, I have been living in the results of the bad code that Swift allows developers to create. Debugging how a tap in a UITableViewCell

Re: Need for Swift

2019-10-15 Thread Jean-Daniel via Cocoa-dev
> Le 15 oct. 2019 à 04:43, Alex Zavatone via Cocoa-dev > a écrit : > > > >> On Oct 14, 2019, at 1:25 PM, Carl Hoefs via Cocoa-dev >> wrote: >> >> The group that likes Obj-C sees Swift as being "arbitrarily syntactical" >> with the syntax of the language getting in the way of programming.

Re: Need for Swift

2019-10-15 Thread Jeremy Hughes via Cocoa-dev
> On 15 Oct 2019, at 18:27, Turtle Creek Software via Cocoa-dev > wrote: > > MVC is an excellent design paradigm. The M and V layers were no problem at > all to set up. The C started out easy, but ended up being a big problem. > Quite a bit of the business logic is not just data, but fancy stuf

Re: Need for Swift

2019-10-15 Thread Laurent Daudelin via Cocoa-dev
2-3 programmer-years seems a lot to me already. -Laurent. -- Laurent Daudelin laur...@nemesys-soft.com Skype: LaurentDaudelin Logiciels Némésys Software

Re: Need for Swift

2019-10-15 Thread Alex Zavatone via Cocoa-dev
Sent from my iPhone > On Oct 15, 2019, at 10:37 AM, John Joyce via Cocoa-dev > wrote: > > > >> >> On Oct 15, 2019, at 22:58, Turtle Creek Software via Cocoa-dev >> wrote: >> >> Nobody >> is every going to write a full CAD, project management or business >> accounting app in either Swift

Re: Need for Swift

2019-10-15 Thread Alex Zavatone via Cocoa-dev
The push for server side Swift is interesting in that it embodies the philosophy of moving Swift to other platforms/arenas. Sent from my iPhone > On Oct 15, 2019, at 8:57 AM, Turtle Creek Software via Cocoa-dev > wrote: > > This discussion about Swift vs Objective-C is interesting, but I thin

Re: Need for Swift

2019-10-15 Thread Richard Charles via Cocoa-dev
> On Oct 15, 2019, at 11:27 AM, Turtle Creek Software via Cocoa-dev > wrote: > > The basic language problem as I see it is in the headers. Classes are > either Obj-C or C++ and can't be both. It turned out to be an enormous > barrier that caused all sorts of pains. >From older documentation

Re: Need for Swift

2019-10-15 Thread Turtle Creek Software via Cocoa-dev
>> For context: I work on a database library[1] implemented in C++ that provides exactly such a C API Diving down into C sounds like a reasonable option for a database library. It does not sound good for a specialty app that does construction estimating and accounting. Libraries just show Assembly

Re: Need for Swift

2019-10-15 Thread Turtle Creek Software via Cocoa-dev
We did put 2 or 3 programmer-years into a Cocoa GUI. Problem is, it appears that it will need 2 or 3 more. There probably won't be enough Mac buyers left in 2 or 3 years to pay for that. I agree that QT, wxWidget and Electron build crappy apps. And some effort will always be required to interfa

Re: Need for Swift

2019-10-15 Thread David Swofford via Cocoa-dev
As another developer who procrastinated on converting the GUI for a large application away from Carbon, I have also found this discussion to be highly illuminating. My excuse is that I'm an academic, and while the users of my software appreciate the GUI, the absolute last way I want to spend my

Re: Need for Swift

2019-10-15 Thread Paul Scott via Cocoa-dev
> On Oct 15, 2019, at 9:40 AM, Richard Charles via Cocoa-dev > wrote: > > I have found your comments enlightening. So if I understand correctly you > have three choices for a native UI on the Mac. > > 1. Objective-C which would integrate nicely with your C++ business logic > using Objective-

Re: Need for Swift

2019-10-15 Thread David Brittain via Cocoa-dev
Swift / C++ inter-op is being worked on. It's important to many (including Apple I would guess)... https://forums.swift.org/t/c-objective-c-interop/9989/2 https://mobile.twitter.com/jeremyphoward/status/1154974115893149696 On Tue, 15 Oct 2019 at 09:41, Richard Charles via Cocoa-dev < cocoa-dev@l

Re: Need for Swift

2019-10-15 Thread Jens Alfke via Cocoa-dev
> On Oct 15, 2019, at 9:40 AM, Richard Charles via Cocoa-dev > wrote: > > 2. Another option is Swift but it has zero integration with C++. So this is > really not a choice at all. Swift integrates with C. So you can declare C APIs to your C++ codebase, and call those from Swift. This does m

Re: Need for Swift

2019-10-15 Thread Richard Charles via Cocoa-dev
> On Oct 15, 2019, at 7:57 AM, Turtle Creek Software via Cocoa-dev > wrote: > > TurtleSoft has a big investment in C++ source code that's full of > construction business logic. Unfortunately, with the death of Carbon its > future value is in doubt. I have found your comments enlightening.

Re: Need for Swift

2019-10-15 Thread Jeremy Hughes via Cocoa-dev
Maybe it’s also worth noting that WebKit (the browser engine used by Safari) is written in C++ Safari’s UI is probably written in Obj-C(++) or a mixture of Obj-C(++) and Swift. Jeremy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Need for Swift

2019-10-15 Thread Jens Alfke via Cocoa-dev
> On Oct 15, 2019, at 6:59 AM, Turtle Creek Software via Cocoa-dev > wrote: > > TurtleSoft has a big investment in C++ source code that's full of > construction business logic. Unfortunately, with the death of Carbon its > future value is in doubt. I know I’ve brought up Objective-C++ to you h

Re: Need for Swift

2019-10-15 Thread John Joyce via Cocoa-dev
> > On Oct 15, 2019, at 22:58, Turtle Creek Software via Cocoa-dev > wrote: > > Nobody > is every going to write a full CAD, project management or business > accounting app in either Swift or Obj-C. > > TurtleSoft has a big investment in C++ source code that's full of > construction business

Re: Need for Swift

2019-10-15 Thread Turtle Creek Software via Cocoa-dev
This discussion about Swift vs Objective-C is interesting, but I think it omits something important. Both those languages only build apps for Apple products. It's not such a big deal for iOS. iPhones are dominant enough that people can write just for that. Phone/pad apps are also relatively small,

Re: Need for Swift

2019-10-15 Thread Sandor Szatmari via Cocoa-dev
I always felt that swift was introduced to allow the development ecosystem to grow and intended to be a language that eliminated some of the squishiness of Objective-C. My opinion is that this was intended to make Apple’s job of code review and approval easier and more concrete (business case?)

Re: Need for Swift

2019-10-15 Thread Alex Zavatone via Cocoa-dev
> On Oct 15, 2019, at 1:37 AM, Quincey Morris via Cocoa-dev > mailto:cocoa-dev@lists.apple.com>> wrote: > > The really important thing about using Swift is that you *have to* learn to > change the way you think about dealing with nil values. And it’s a fucking cumbersome pain in the ass. Sim

Re: Need for Swift

2019-10-14 Thread Quincey Morris via Cocoa-dev
OK, apologies in advance for toes trodden on or sensibilities offended, but it sounds like it’s time for my anti-optional-whining rant. :) The really important thing about using Swift is that you *have to* learn to change the way you think about dealing with nil values. It’s not quite literally

Re: Need for Swift

2019-10-14 Thread Laurent Daudelin via Cocoa-dev
I’ve been wondering the same thing. I thought that maybe because I was biased toward Obj-C. But if it wasn’t for the editor, damn, I don’t know how many times I would have to go back to unwrap one of those optionals. Are people supposed to know instinctively when you unwrap with “?” and when you

Re: Need for Swift

2019-10-14 Thread Pier Bover via Cocoa-dev
> > I, for one shuddered when I saw “if let x = y” being something that people > are expected to use and that damn, “you must unwrap this optional”, simply > ends up making things that were simple in Objective-C, completely > cumbersome in Swift. > Totally agree... I've only used Swift on one proj

Re: Need for Swift

2019-10-14 Thread Alex Zavatone via Cocoa-dev
> On Oct 14, 2019, at 1:25 PM, Carl Hoefs via Cocoa-dev > wrote: > > The group that likes Obj-C sees Swift as being "arbitrarily syntactical" with > the syntax of the language getting in the way of programming. (There is a > third group that likes both languages, but it is very small.) I am

Re: Need for Swift

2019-10-14 Thread Charles Srstka via Cocoa-dev
> On Oct 14, 2019, at 7:21 PM, Jens Alfke wrote: > >> On Oct 14, 2019, at 5:02 PM, Charles Srstka > > wrote: >> >> Swift, on the other hand, can actually *be* a scripting language if you want >> it to; put #!/usr/bin/env swift at the top of a source file, give i

Re: Need for Swift

2019-10-14 Thread Jens Alfke via Cocoa-dev
> On Oct 14, 2019, at 5:02 PM, Charles Srstka wrote: > > Swift, on the other hand, can actually *be* a scripting language if you want > it to; put #!/usr/bin/env swift at the top of a source file, give it execute > permissions, and voilà, it’ll run just like a script. *Anything* can be a scr

Re: Need for Swift

2019-10-14 Thread Charles Srstka via Cocoa-dev
> On Oct 14, 2019, at 2:30 PM, Jens Alfke wrote: > >> On Oct 14, 2019, at 11:25 AM, Carl Hoefs via Cocoa-dev >> mailto:cocoa-dev@lists.apple.com>> wrote: >> >> I see Computer Science students here falling into two groups. The group that >> likes Swift generally likes scripting languages, Pytho

Re: Need for Swift

2019-10-14 Thread Jens Alfke via Cocoa-dev
> On Oct 14, 2019, at 11:25 AM, Carl Hoefs via Cocoa-dev > wrote: > > I see Computer Science students here falling into two groups. The group that > likes Swift generally likes scripting languages, Python, and the like. Whoa, I completely disagree. Objective-C is much, much closer to scripti

Re: Need for Swift

2019-10-14 Thread Carl Hoefs via Cocoa-dev
> On Oct 12, 2019, at 9:24 AM, Charles Srstka via Cocoa-dev > wrote: > >> On Oct 12, 2019, at 10:55 AM, Pier Bover via Cocoa-dev >> wrote: >> >> Yeah I think Apple saw Obj-C as a barrier for developer adoption. I don't >> think that's too far from the truth considering the emphasis on teachi

Re: Need for Swift

2019-10-12 Thread Charles Srstka via Cocoa-dev
> On Oct 12, 2019, at 11:24 AM, Charles Srstka wrote: > > The string nil checks, in particular, This was meant to be “The strict nil checks.” Ah, the joy of mailing lists, where there’s no edit feature. Charles ___ Cocoa-dev mailing list (Cocoa-dev

Re: Need for Swift

2019-10-12 Thread Charles Srstka via Cocoa-dev
> On Oct 12, 2019, at 10:55 AM, Pier Bover via Cocoa-dev > wrote: > > Yeah I think Apple saw Obj-C as a barrier for developer adoption. I don't > think that's too far from the truth considering the emphasis on teaching > Swift to young devs, Playgrounds, the marketing about teenagers making > th

Re: Need for Swift

2019-10-12 Thread Pier Bover via Cocoa-dev
Yeah I think Apple saw Obj-C as a barrier for developer adoption. I don't think that's too far from the truth considering the emphasis on teaching Swift to young devs, Playgrounds, the marketing about teenagers making their first app, etc. Swift has its quirks but most people around me prefer it o

Re: Need for Swift

2019-10-12 Thread Laurent Daudelin via Cocoa-dev
I think Swift came out for the Apple’s desire to make it even more appealing to develop for its platforms. I don’t know over the years how many times I’ve heard people bitching about Objective-C and its “weird” syntax. People couldn’t get over it. Swift makes it easy for all the throngs of Java

Re: Need for Swift

2019-10-12 Thread Richard Charles via Cocoa-dev
> On Oct 11, 2019, at 9:09 PM, Kirk Kerekes via Cocoa-dev > wrote: > > It is my inference that Swift arose out of a perceived need for a language > that strongly inhibited bad/lazy/sloppy programming practices, and yet looked > “normal”. Here is my take. I think Swift came from the mind of C

Re: Need for Swift

2019-10-11 Thread Jens Alfke via Cocoa-dev
> On Oct 11, 2019, at 8:10 PM, Kirk Kerekes via Cocoa-dev > wrote: > > I further infer that the perceived need arose due to the confluence of > aggravation over publicity over security bugs and the desire to develop > autonomous vehicle software. I don’t think so. Language people don’t deve

Re: Need for Swift

2019-10-11 Thread Alex Zavatone via Cocoa-dev
> On Oct 11, 2019, at 10:09 PM, Kirk Kerekes via Cocoa-dev > wrote: > > I would not want to be at the mercy of a vehicle piloted by C++. In the immortal words that I have in an email from John Carmack, “Failure in brakes.dll." ___ Cocoa-dev maili

Need for Swift

2019-10-11 Thread Kirk Kerekes via Cocoa-dev
> On Oct 11, 2019, at 7:55 PM, cocoa-dev-requ...@lists.apple.com wrote: > > Me, I still don?t understand why, given the long history of support at > Apple/NeXT for C++ and the maturity of the compilers available, there is any > need for Swift. But there it is. It is my infer