News for hackers. Stuff that matters.
Re:OS X app in plain C by Hydraulix989 on Thursday May 05, 2016 @08:39PM (#11640848)
Why recommend Objective-C over C/C++ though? It's more or less subject to the same "pitfalls" that go against C, PLUS it is a syntactical nightmare.

[whatTheHell:is this:shit];

Is ARC really that much of a savior here? At least method calls get resolved at compile time.

Re:OS X app in plain C by ssalazar on Friday May 06, 2016 @08:46PM (#11647778)
> It's more or less subject to the same "pitfalls" that go against C

Only if you write C code in Objective-C.

> PLUS it is a syntactical nightmare. [whatTheHell:is this:shit];

Honestly, get over it. This is largely a surface-level detail that makes no difference once youve used the language for more than a week. I take it you have similar complaints against Ruby, Python, Lisp, or any other language that dares to break ranks with the C++/Java syntax idiom.

> Is ARC really that much of a savior here?

Yes, manual memory management is one of the main things that C/C++ programmers seem to consistently screw up.

Re:OS X app in plain C by Hydraulix989 on Friday May 06, 2016 @09:46PM (#11647943)
> Yes, manual memory management is one of the main things that C/C++ programmers seem to consistently screw up.

There's no reason why memory management _should_ be something that C++ programmers screw up now with containers like smart_ptr and std::string. Yes, if you malloc/free stuff and use things like memcpy, you're playing with fire, but the whole point of "modern C++" is that we have better and safer alternatives.

On the other hand, Obj-C message passing (which really means method calls that are resolved at runtime) is another way, like manual memory management, to really shoot yourself in the foot if you make a mistake.

> I take it you have similar complaints against Ruby, Python, Lisp, or any other language that dares to break ranks with the C++/Java syntax idiom.

I actually don't. Forced named parameters and "array brackets" denote method calls are arguably poor choices for syntax.

On the other hand, getting rid of semicolons and enforcing whitespace a la Python is okay, and Lisp is really just an extension of RPN.

The point is your point that I dislike anything by default that is "not C/C++/Java" is actually pretty incorrect.

I do have opinions, but that isn't the basis through which they are formed, and quite honestly, I'm offended that you even made such an assumption about me in the first place.

> Honestly, get over it.

Bad advice, I'm allowed to have an opinion (and I do substantiate it above).

Regardless, I have "gotten over it" given that a large portion of my day job is spent writing Obj-C, and while I do like it better than Java as a language overall (even not having to deal with JNI for interop is a dream), god help the syntax.

Re:OS X app in plain C by ssalazar on Saturday May 07, 2016 @12:41AM (#11648420)
Unsubstantiated complaints of "omg brackets" were already tiring in 2008 when they were repeatedly voiced by many the new Objective-C programmers flocking to iOS development. If you have some reasoning for why Objective C's message passing syntax is bad, please voice it. (You haven't.) Otherwise you are just adding noise to the discussion.
Re:OS X app in plain C by Hydraulix989 on Saturday May 07, 2016 @02:20AM (#11648605)
I'm not biting that bait, sorry.

You've already made the point that my opinion is a popular one. To wit, I find it amusing that the Google autocomplete for "Objective C syntax" is "horrible."