The best starting language for mac...?

Moderator
Posts: 3,570
Joined: 2003.06
Post: #31
(Jan 3, 2011 11:30 AM)Kerome Wrote:  I wonder, has anyone explored Google's Go as an early programming language? That would incorporate modern ideas about threading, although it may well be a circular argument which leads back to C, since before you get that far you'd need the basic C concepts.

There's a thread around here somewhere a while back where we were jabbering about it for a bit. I think Go looks promising. I was also turned on to ooc.

Lately I've been seriously considering several different languages to be my next focus after my 20 years of C experience. As far as I can tell, and consulting with others, C# appears to be the state of the art in modern programming languages, and the way things appear to be headed. I agree that C and C++ are solidly entrenched for now though, at least for bare-metal programming stuff. It is going to take a very serious contender to knock them out of that slot, and my money is on C# for now, but we'll see how things play out... I love Objective-C too, but it's not "knocking the ball out of the park", for lack of a better way to put it.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #32
C# state-of-the-art? I wouldn't call it that.

Ruby is my pick of the current languages for "most modern", and Rust is my pick of the up-and-comings.
Quote this message in a reply
Moderator
Posts: 3,570
Joined: 2003.06
Post: #33
Ha! Okay then, state of the industry's love affair... Rasp

I was *almost* going to mention that OSC will say Ruby is the bomb, but I didn't want to step ahead too far Wink
Quote this message in a reply
Member
Posts: 260
Joined: 2005.05
Post: #34
It feels a bit vague when we just name languages. What is important is really the features, why these languages are interesting. What are we looking for? And I think the answer will be very different depending on the goals.

Do we want it to be intuitive to understand? Demand as few keystrokes as possible? Do we want simple programs to be really simple, so one gets started easily, or do we insist that some features are so important that you must learn them before even writing "Hello World!"? Do we demand the language to be a major industry language, or that the transition to such languages is easy? Are there any vital modern features that a starting language desperately needs? Should the syntax be close to english or close to math notation, or can it be any mess as long as it works?

IMHO, the first thing to do is to learn to program at all, to learn thinking in code and algorithms. Even BASIC is OK for that and actually pretty good. There are few languages where the simple is so simple (although it doesn't scale very well and is awfully incompatible with itself).

Then, of course, we have the question of the thread, starting language on the Mac. If we talk Mac applications, AppStore, it must simply be a language with strong support for Cocoa. ObjC has it of course, and FPC has good support. Java used to have Cocoa bindings but I don't know what state that is in. More?

Summary: I'd like to hear a bit more why than what.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #35
Ruby has great support for web development (rails, heroku, etc.); great support for Cocoa (MacRuby, RubyCocoa). It's OO, it's procedural, it's functional if you think it is, it's incredibly dynamic, it has built-in regular expressions, it has continuations, it has pretty much everything. All the power allows you to write very compact code (and I generally find it to be true that fewer LoC = fewer bugs). For me, it has the lowest "barrier to expression" of any language I've used. The downside is that the syntax is arcane, and like C++, it's easy to abuse all the language features into writing horribly unreadable and unmaintainable code.

It's probably not the best starting language though. Better than C/C++/ObjC, I'd say, but the complexity of the language (and poor error messages from the compiler) don't work in its favor for beginners.
Quote this message in a reply
Moderator
Posts: 3,570
Joined: 2003.06
Post: #36
(Jan 4, 2011 10:33 AM)Ingemar Wrote:  Then, of course, we have the question of the thread, starting language on the Mac. If we talk Mac applications, AppStore, it must simply be a language with strong support for Cocoa. ObjC has it of course, and FPC has good support. Java used to have Cocoa bindings but I don't know what state that is in. More?

Well, how "starting" are we talking about? As I already mentioned earlier in the thread "you might consider starting with something even easier like processing or python/pygame or some modern dialect of BASIC for the Mac".

If one is looking for the most direct route, I'd highly recommend C, not just because I use it, but because you'll have to know it regardless of which path you eventually wind up on. There is just sooooo much software out there that provides a C API that I don't believe a programmer can realistically get around learning it at some point to some degree, so I say you might as well start with it, if only to get it out of the way.

Yes, from a practical standpoint, a language's "industry standardness" is a prime consideration. Simply put: the more people that use a language, the more support you'll find for it. That's not to say that just because it is popular it is good (take C++ for instance Rasp).

By far the vast majority of software in the western world is (being) written for Windows, and C# is Microsoft's prime offering in modern languages (if one is allowed to call it that) to develop software for their platforms. C# is actually a pretty nice language IMHO, which borrows heavily from both C and C++, and in my view helps get away from some problems with both. Two examples:
- C doesn't have object-orientation built-in, but C# does.
- C++ has too much stuff and C# does away with some of the bad features, like for instance, there is no direct support for multiple inheritence in C#.

C# is available for free on Mac/Win/Linux via Mono, and is available on iOS via MonoTouch for a fee (which is really Apple's fault because they don't allow dynamic linking).

C# is pretty fast in terms of raw performance.

It is embeddable, which makes it available as a "scripting language" for games and such. Heck, one of the languages Unity supports is C#.
Quote this message in a reply
Moderator
Posts: 452
Joined: 2008.04
Post: #37
Corona SDK was mentioned, but discussion around it got longwinded and was split to this thread:

http://www.idevgames.com/forums/thread-8506.html

Edit: fixed link

Howling Moon Software - CrayonBall for Mac and iPhone, Contract Game Dev Work
Quote this message in a reply
Member
Posts: 260
Joined: 2005.05
Post: #38
(Jan 6, 2011 12:40 PM)AndyKorth Wrote:  Corona SDK was mentioned, but discussion around it got longwinded and was split to this thread:

http://www.idevgames.com/forums/thread-333-page-3.html
Excellent idea (it was rather irrelevant to the topic), but the link is to this thread.
Quote this message in a reply
Moderator
Posts: 452
Joined: 2008.04
Post: #39

Howling Moon Software - CrayonBall for Mac and iPhone, Contract Game Dev Work
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #40
(Apr 5, 2011 12:48 AM)CASIMIRO Wrote:  I would say that C language is the best option to start Mac . As we know that all people mostly use C because of mother of all languages .

Who's the father? Ninja
Quote this message in a reply
Member
Posts: 260
Joined: 2005.05
Post: #41
(Apr 5, 2011 12:48 AM)CASIMIRO Wrote:  I would say that C language is the best option to start Mac . As we know that all people mostly use C because of mother of all languages .

From that point of view, the right answer is Algol. Pretty much all modern languages are really Algol rip-offs. Not least C. (No, I don't know any usable Algol compiler, but it is still the "mother of all languages".)

Who is the father? Well, the grandparents are Fortran and Cobol. And Lisp is their dog. But what is then assembly language and machine code?
Quote this message in a reply
Member
Posts: 64
Joined: 2005.06
Post: #42
I started out programming just over a decade ago now and I have to say that I had no trouble learning a variety of different languages over the years, and I attribute that to the first two languages I learned.

The very first thing I started out in was REALbasic, which I'm sure all of you know is an OO version of Basic used by REALSoftware. Having had absolutely no experience before that, I quickly grasped onto many of the fundamentals that applied to programming in general and just as importantly, it taught me from the get-go the concepts and practices behind object orientation.

The downside to any version of Basic is that it is quick to pick up, but as soon as you have a decent grasp on it, it leaves you wanting something more. So I took the plunge and started learning Objective-C (MacOS X hadn't been out very long at all at this point). Concepts such as pointers and memory management took a bit of work to get the hang of, but I found Objective-C as a whole, very easy to learn, especially since many of the concepts I had learned using REALbasic, directly applied.

With a firm foundation in those first two languages, I've learned all sorts of other languages over the years, many of them just to try and see how I liked them. I've found that nothing has been as hard as initially learning the first two languages, because everything that has come after may have different syntax, but it all relies on the same basic principles.

As a bit of a tangent: over ten years is a long time; even after buying a new MacMini last month after my old Mac kicked the bucket, I barely use it aside from surfing the web and doing seismic work (most of the programs I use, such as SAC and rdseed are available for Unix and MacOS X).

Even my time spent programming is almost entirely done on and for Windows now, despite purposefully writing cross-platform code (I wrote a simple windowing and system abstraction library for my game projects). But what has never changed? I'm still programming in Objective-C, because I simply have yet to find another language I enjoy reading and writing in as much as it.

P.S. Not to swell OSC's ego, but I agree entirely about C++; it is easily the language I dislike the most and have only ever put up with it so I could learn from a lot of the various tutorials and sample code on the web. The only way I can adequately describe my perception of C++, is as an object oriented language, designed by someone who didn't know what object orientation was when they designed it, so someone else had to go back and hack together something that sorta resembled OO.
Quote this message in a reply
Member
Posts: 260
Joined: 2005.05
Post: #43
I just had a look at Google Go, and... what is the point? It seems to inherit absolutely every design flaw of C. Why inventing a "new" language that is so close to C, just incompatible with it? I must have missed the big "why" somewhere.
Quote this message in a reply
Moderator
Posts: 3,570
Joined: 2003.06
Post: #44
I think the go FAQ does a pretty good job of explaining their rationale.
Quote this message in a reply
Member
Posts: 64
Joined: 2005.06
Post: #45
(Apr 7, 2011 07:05 AM)AnotherJake Wrote:  I think the go FAQ does a pretty good job of explaining their rationale.

This right here:

Go Docs Wrote:Why is there no pointer arithmetic?

Safety. Without pointer arithmetic it's possible to create a language that can never derive an illegal address that succeeds incorrectly. Compiler and hardware technology have advanced to the point where a loop using array indices can be as efficient as a loop using pointer arithmetic. Also, the lack of pointer arithmetic can simplify the implementation of the garbage collector.

...automatically makes Go a nonviable alternative. There is a crazy amount of algorithms, especially for hashing, random number generation and data handling that rely on pointer arithmetic to function at any reasonable efficiency, and saying that advances in compiler and hardware technology could make alternative methods as fast as pointer arithmetic doesn't fly. Modern compilers should equate equivalent modulus and bit-mask operations into the same machine-code for a given system, but no one would actually suggest you use the modulus operator if you were looking to squeeze every last cycle out of a function.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Hello, starting first project, looking for advice in language and tools aqua_scummm 15 7,370 Jan 31, 2008 06:39 AM
Last Post: ynda20