Boy this really doesn’t help SF’s image. Glad they’re okay, though. As a local, and like the article mentions, I feel embarrassed and somehow responsible for stuff like this. It’s so sad to me that they came here with an open mind to see what SF is really like and this happens.
Do you have multiple people collaborating with you? If I’m writing code that only I need to understand then yes, typescript may be overkill (though I prefer types even then), but working on any meaningful codebase without types is… challenging. Types aren’t that hard are they?
I have, yes. From a team perspective, there's zero technical difference between TypeScript types and a combination of default args and type checker functions. The same ends are achieved, but in a far less kludgy way that's overt. In the event a type checker is missing, it can be added/documented quickly with zero time wasted on trying to answer "what's the TypeScript way to do this?"
Types aren't the difficult part, it's TypeScript that's difficult. The documentation is a nightmare and in my experience I saw "any" types being used far too often (which literally defeats the purpose of using TypeScript).
>there's zero technical difference between TypeScript types and a combination of default args and type checker functions
I may be missing something, but aren't your type checker functions called at runtime whereas Typescript would be doing static type checking at compile time?
They are, but in practice there's little difference in the ends because you're getting the same feedback (did I pass the right type, yes or no). Like calling someone on a cell phone vs. a land line.
If the type of data you're passing around is erratic beyond development (where, just like TypeScript, a function-based approach illuminates incorrect data being passed around), you're writing bad code and TypeScript is nothing more than a crutch.
I expect most hardline TypeScript people to disagree, but type errors are the least of my concerns thanks to the above approach. It's not just an opinion; it's based on experience/evidence [1].
Well that’s certainly a hot take. I’d say TypeScript is the best thing to happen to JS, but that’s just my opinion. It’s not perfect, but it makes working on a large codebase tolerable. To each their own.
Honestly, I can't get my head around how anyone could prefer Objc over Swift. I suppose it's just years of writing Objc and not wanting the change?
Like Swift is not a perfect language and Apple's developer docs lack useful examples a lot of times, but Objective-C has to be the least approachable language in all of app development.