Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Reason077

macrumors 68040
Aug 14, 2007
3,645
3,715
I have to completely disagree with this. The syntax is outstanding (forcing named parameters does wonders for readability). It has recently started to support boxing/unboxing which Java still doesn't support properly.

How does Java not support boxing/unboxing "properly"? ObjC's boxing is basically copying exactly what Java has done for years.

Does Java have closures?

Well, you could argue that Java has always had closures in the form of Anonymous classes.

In Java 8 it does have true closures (and much better syntax), in the form of Lambda expressions.

I think Objective-C is an extraordinary language. ARC is a far superior memory management model compared to Java's as well.

Err... I like ARC. It's very clever and has improved ObjC development productivity immeasurably.

But you cannot compare it to a real garbage collector. ARC is a compromise, and has numerous limitations and potential problems if you're not careful.
 

CFreymarc

Suspended
Sep 4, 2009
3,969
1,149
I think that's how my first C course went. Thank goodness we used Java when we worked a bit on GUIs though.

Java is good to learn but IMO, it is no a good first programming language. For 90% of the industry these days, all roads originate from K&R. Learn that syntax and you can take many different turns down the whatever color of brick road you care. Below are some really interesting paths I have seen.

Embedded Road: C -> assembly -> hardware description languages (Verilog, et. al.)

Website Road: C -> Java -> JavaScript -> HTML -> HTML5 (Flash is dead IMO)

iOS Road: C -> C++ -> Objective-C

Android Road: C -> C++ -> Java -> Java Beans

Server Road: C -> C++ -> Java -> SQL

There are just a few of the most common roads. Then there is industrial controls, but that is a totally different set of highways.
 

horsebattery

macrumors 6502
Sep 24, 2013
314
426
Java is good to learn but IMO, it is no a good first programming language. For 90% of the industry these days, all roads originate from K&R. Learn that syntax and you can take many different turns down the whatever color of brick road you care. Below are some really interesting paths I have seen.
Having started my CS program with both, I am definitely glad they taught us C first. In my case, I went C->Java->Scheme->Haskell->Python. We only dabbled in Scheme and Haskell and I took up Python on my own time. I'd say I can tackle new languages relatively well as a result of this.
 

koruki

macrumors 65816
Aug 16, 2009
1,350
671
New Zealand
Coders will learn to code with whatever means possible. Its nice that they are showing people this but you won't go far if you're not interested.
 

twigman08

macrumors 6502
Apr 13, 2012
478
1
I would agree, to an extent, on Java. But, C++, really?

If you think Obj C's syntax is "bad", then C++ is much much worse. Learning C++ as your first language would be enough to put anyone off programming forever (and I say this as a C++ programmer). It's the last language you'd want to teach kids!

Languages like Ruby or Python are probably the best for beginners. Simple enough that real, useful programs can be produced quickly and productively. Yet they also do a reasonable job of clearly conveying real OO principles.


I learned C++ as a first language in 10th grade. I seemed to do just fine. Matter of fact it sparked my interest so much that I am now working towards my degree in Computer Science.

One could make the exact same argument about what language to start learning first. Fact is: their isn't really one. Every language would have its pros and cons.

Also I don't think I would say C++ syntax is bad (it can get ugly with some more advanced features but by the time beginners see/use that then they should have no problem understanding it.
 

janstett

macrumors 65816
Jan 13, 2006
1,235
0
Chester, NJ
I've been coding for decades. It really irritates me seeing politicians hawking this. Has Obama or Corey Booker ever done so much as Hello World? Did Barry take CIS101 at Punaho, or Occidental, or Columbia, or Harvard? Since we don't even have transcripts we will never know. Somehow I doubt 8086 assembly will show up on his transcript.

071.jpg


----------

Care to explain why? We'd love to hear the reasoning.

In a nutshell, Objective-C is an evolutionary dead-end of the C family, from before the ratification of C++ as a language. Which makes sense when you try to fit it into history, NeXT started when, 1987, and IIRC C++ was ratified in the early 90s.

It is trying to apply C++-like ideas (classes, inheritance, et al) without having the more elegant C++ means of accomplishing it.

Sure, you can mimmic it with C -- creating function pointer tables, etc. This happens a lot with embedded systems where C++ compilers may not even be available.

With regards to Objective-C, I am very disappointed in Apple for not evolving the language. I guess if it ain't broke, don't fix it, right? I mean, this is one area where MS does a better job than Apple. MS's tools have evolved over time, a big difference from their origins to today's C#/.NET tools and framework. I do wish Apple had a more modern language for development. (And yes, ARC does help).

So much of Apple's stuff is rooted in the late 80s and NeXT. Objective-C's bizarre pre-C++ constructs, heck everything is derived from NSObject, strings are NSString -- NS = NeXT Step.

I've found it very difficult to spread Objective-C knowledge in my organization. I'm evangelizing iOS/OSX development and it takes experienced developers a month+ to get used to the bizarreness of Objective-C, not even counting learning Cocoa et al.

----------

It's a conspiracy by the tech companies. They want to manipulate the nations schools to produce a glut of qualified coding drones so that overpaid programmers who are nearing retirement age (i.e. ~30) can be fired. Lower salaries = bigger profits! ;)

The secret is you can hire 5 of the same fresh-out-of-school code monkeys from India for the price of one here. I pity people graduating with CS degrees today. I've survived by moving up the food chain and evolving.
 
Last edited:

KdParker

macrumors 601
Oct 1, 2010
4,793
998
Everywhere
In a nutshell, Objective-C is an evolutionary dead-end of the C family, from before the ratification of C++ as a language. Which makes sense when you try to fit it into history, NeXT started when, 1987, and IIRC C++ was ratified in the early 90s.

It is trying to apply C++-like ideas (classes, inheritance, et al) without having the more elegant C++ means of accomplishing it.

Sure, you can mimmic it with C -- creating function pointer tables, etc. This happens a lot with embedded systems where C++ compilers may not even be available.

With regards to Objective-C, I am very disappointed in Apple for not evolving the language. I guess if it ain't broke, don't fix it, right? I mean, this is one area where MS does a better job than Apple. MS's tools have evolved over time, a big difference from their origins to today's C#/.NET tools and framework. I do wish Apple had a more modern language for development. (And yes, ARC does help).

So much of Apple's stuff is rooted in the late 80s and NeXT. Objective-C's bizarre pre-C++ constructs, heck everything is derived from NSObject, strings are NSString -- NS = NeXT Step.

I've found it very difficult to spread Objective-C knowledge in my organization. I'm evangelizing iOS/OSX development and it takes experienced developers a month+ to get used to the bizarreness of Objective-C, not even counting learning Cocoa et al.

----------



Couldn't agree more. Not sure why Apple hasn't moved there development platform to C++ or created there own variation (ala MS with C#).

I have been waiting for this evolution, but it just hasn't happened yet.
 

KdParker

macrumors 601
Oct 1, 2010
4,793
998
Everywhere
I would agree, to an extent, on Java. But, C++, really?

If you think Obj C's syntax is "bad", then C++ is much much worse. Learning C++ as your first language would be enough to put anyone off programming forever (and I say this as a C++ programmer). It's the last language you'd want to teach kids!

Languages like Ruby or Python are probably the best for beginners. Simple enough that real, useful programs can be produced quickly and productively. Yet they also do a reasonable job of clearly conveying real OO principles.

C++ and Java are so similar in there syntax that learning either will be fine. Never used Ruby or python in my professional career, but the OO principles that I have learned from my first language (C++) has served me well in all my jobs.

When MS moved away from Visual Basic towards C# this made the transition to .NET platform very easy.

Now ANSI C? Seemed like a step back to me as far as coding languages, but it was easy enough to get used to the syntax.
 

mijail

macrumors 6502a
Oct 31, 2010
561
137
Interesting to see the quantity of people here discussing on details that boil down to syntax and prettyness of the diferent siblings of C with OO, and how "the rest" have it backwards because they favor a slightly different shade of either.

And then you complain that others come and take your programming jobs? Do tell, Sherlock.
 

Reason077

macrumors 68040
Aug 14, 2007
3,645
3,715
Couldn't agree more. Not sure why Apple hasn't moved there development platform to C++ or created there own variation (ala MS with C#).

I have been waiting for this evolution, but it just hasn't happened yet.

Apple controls Objective C already. They can (and do) go off and invent their own new features all the time.

You can argue that its smalltalk-like syntax was a dead-end, and the language itself is much smaller than C++ - but many (most?) would argue that this is a good thing.

But in terms of the capabilities of the Objective C runtime, ObjC is - even today - much more dynamic and sophisticated than C++. With things like ARC and selector-based dispatch, it's arguably more like dynamic runtimes such as C# or Java than traditional static languages like C++.

I suspect Apple will continue evolving ObjC to improve the runtime and add missing language features. There's no compelling reason for them to switch to anything else.
 
Last edited:

ppenn

macrumors regular
Oct 22, 2013
115
22
If you want to be pissed off and feel like you learned nothing, take a workshop of this magnitude at an Apple Store...or at least my former store. Nobody knows anything.
 

DrMotownMac

Contributor
Jul 11, 2008
385
213
Michigan
I've been coding for decades. It really irritates me seeing politicians hawking this. Has Obama or Corey Booker ever done so much as Hello World? Did Barry take CIS101 at Punaho, or Occidental, or Columbia, or Harvard? Since we don't even have transcripts we will never know. Somehow I doubt 8086 assembly will show up on his transcript.

Image

LOL! That is HILARIOUS! The idea of our reefer-smoking, wealth-redistributing, pop-culture worshipping, transcript-hiding dumbell-in-chief studying 8086 assembly (or Scratch, for that matter) seems very implausible. Programming requires LOGIC. Thinking you can take money from Person A, process it through a large and costly bureaucracy, and then distribute it back to Person B, and use that to grow the economy, is about as far from logical thinking as you can get. And his healthcare.gov site speaks volumes about his knowledge or interest in programming, wouldn't you agree?

And by the way, that photo you posted pretty much says it all. Behold the leader of the free world.
 

numlock

macrumors 68000
Mar 13, 2006
1,590
88
It's a conspiracy by the tech companies. They want to manipulate the nations schools to produce a glut of qualified coding drones so that overpaid programmers who are nearing retirement age (i.e. ~30) can be fired. Lower salaries = bigger profits! ;)

exactly what it is.

increase the supply and make this job like the car manufacturer or stock boy of yesteryear.

corporate welfare. instead of seeing the corporate sector trying to mandate education why not go through less loops and pay more tax? but that kinda defeats the whole purpose of this
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.