4 ms·
I actually vastly prefer a language without namespaces, and the naming conventions are not due to the absence of namespaces. You're talking about the NextStep A
by jspthrowaway2 14y ago
I actually vastly prefer a language without namespaces, and the naming conventions are not due to the absence of namespaces. You're talking about the NextStep API (the "NS") and the conventions that were born from that -- there is no mandate nor impetus (and, I don't recall Xcode automatically doing it for me) that you use that convention yourself. They just carried it through for the other APIs, like UIKit being "UI" (UIViewController, etc).
My User object was called, unsurprisingly, "User". [[User alloc] init].
As for interop with C++, Objective-C++ exists and is used for apps in the store. (Hint: 3D games that are ports.)
- eropple 14y agoXCode has a setting in a new project to prepend to all class names. The necessity of that sort of feature indicates a failure of linguistic design (by which I mean the necessity of clearing up symbol pollution--there is also an argument for their use for explicitness, which I reject because the world has shown us its obvious failure). Even just aesthetically--vomiting out half-line identifiers every time I have to refer to a class is, for me, painful and stupid and makes me hate reading what I've written. One of the worst feelings in the world is looking at code you've written and hating even looking at it, and for me there are only three languages I've spent time with where that's the case for reasons beyond me fucking up: Java, Scala--for reasons entirely unrelated to its Java heritage, it makes its own mistakes--and Objective-C. As for Objective-C++, it's useful in a limited capacity but often requires unscrewing your object model in pretty stupid ways just to provide inputs that the Objective-C side won't barf on. It's an "ehh" hack with painful edge cases.
- jspthrowaway2 14y agoI shouldn't have bitten. This is like arguing over why a Phillips screwdriver is better than a flathead with someone who particularly and angrily hates Phillips screwdrivers because he doesn't like their appearance. They're tools, bud. I'm pulling my rip cord on this discussion based on your tone, the nearly guaranteed futility, and the complete lack of any realizable benefit in my own life of carrying on. Good evening.
- deleted 14y ago[deleted]
- deleted 14y ago[deleted]
- deleted 14y ago[deleted]
- andybak 14y agoYour screwdriver analogy doesn't really apply. Language choice has ramifications beyond 'appearance' and you know it. I'm afraid I don't believe that you really don't care about your choice of tools.
- jspthrowaway2 14y agoWith every passing moment I regret replying to this thread more and more. You completely missed how my analogy works, actually, since you think I'm limiting the problem domain to appearance (I'm not; I'm characterizing someone ELSE'S displeasure). I wish the privilege to delete didn't disappear after a time, so I could wash my hands of this thread and forget that I ever spent more than ten minutes on it.
- jack9 14y ago> I actually vastly prefer a language without namespaces, All languages have namespaces. It's clear you don't understand the concept. A namespace is an abstract container to provide context and ensure uniqueness between items with the same name. User is a namespace. Since you have a global namespace, you have to prefix the name to make another type of User. So yes, naming conventions (which are namespaces that are not enforced by the compiler) are due to the absence of namespaces as a construct. Sheesh.
- jspthrowaway2 14y agoSigh. I understand that perfectly, and I thought it would be implied that I meant "multiple user-defined namespaces" where I, and the commenter I replied to, typed the shorter "namespaces". Sheesh. Bring the pedantry, eh? Your vitriol is uncalled for, and since it's only your second comment ever, you should pause a moment to consider whether Hacker News is the community for you (judging by the two comments you've left so far, it isn't; I recommend Reddit for dick jokes and personal attacks on comprehension).
- jack9 14y ago> multiple user-defined namespaces All namespaces are user defined. You probably meant something other than what you posted, which is why I clarified what you communicated. > Your vitriol is uncalled for, and since it's only your second comment ever It's not my second comment ever. Second comment on Ycombinator, is true, not that it has any bearing. > you should pause a moment to consider whether Hacker News is the community for you The "community" that users declare around individual sites, is an imaginary wall. If you considered my comment an attack on comprehension, that's accurate. I think your ability to communicate is limited by poor understanding and you should rephrase to make an actual point. Or don't.