Jump to content
  • Advertisement
Sign in to follow this  
phil05

Thoughts on languages

This topic is 4865 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well, I did my studying. I learned several languages at home including C#, Java, and learned VB.NET and C++ at college. These are my primary languages I program in. I had to face some hard truth... what I want to do in my life. I know it's taking my degree in Computer Science. I'm already on my third year now. I figured game programming is the one. I figure that C++ is the way to go with games... heck, the market uses it beyond any other competing language. It's a standard, sure. But I think of how games and software are evolving, growing more tightly onto the internet requiring portability since most gamers won't be using the same computer or OS brand. I know future computers will be fully .NET'ish, leaving C++ in the PC market place, only to assume that C++ will be no longer upgraded. Since most computers use Windows, I believe it's an issue. C++ will eventually die in that, but I feel it will continue in consoles for a very long time. So, as you can tell, I've been doing some thinking in what language to persue on for games. I'm capable of any language. .NET is good, but I don't know Microsoft's direction. Java is excellent, can do many things, but not very powerful in the marketplace for commercial games, which is sad over the last 10 years. C++ continues to dominate the planet, but falls short in the internet age that we now live in. Also the whole thing of compiling for each target is somewhat annoying when you want anyone with any target to play the same program. That's what I like about Java. So... I guess I just need some direction in where to go next. I feel stuck.

Share this post


Link to post
Share on other sites
Advertisement
I personally believe that once you have mastered programming in any language, picking up another is relatively straight forward. It is the logic of programming, the knowledge of how to solve the problems you face and just the general fundamentals of programming that you need to learn. A Game Loop in Java is a Game Loop in C++. You see my point? :)

Share this post


Link to post
Share on other sites
Right tools for the right job, that's the way to go. Best to learn to use as many as you can.

C++ won't go away any time soon, although I expect it to become somewhat obsolete after about a decade and be replaced by something else. Despite apparent similarities in different programming languages, there are huge differences. C++ and Java seem to be much alike, but when you actually get to program with them, you write programs in a very different way. Many dynamic languages require even more different take on programming. Not to mention different paradigms all together.

If you feel a bit aimless as to what language to learn, I suggest that you look into programming languages and their features in general. The languages you mentioned are all quite similar and lack many features that other languages have, that will possibly come into mainstream in the future.

I believe that mainstream programming languages will get a lot more dynamic in the future. This will be made possible by efficient JIT compiler techniques and more powerful processors that benefit from dynamic (re-)compilation. In the future, languages like Java will likely produce programs that run faster than programs written in staticly compiled languages like C++, while having shorter development times. (And Java isn't even really that dynamic, not to mention that bytecode sucks.)

This trend will hopefully also break platform lock-in, and lead into a healthier software market with more competition in operating systems.

Oh and C will live on quite long as a lowlevel language, so you'd best learn atleast some of that.

Share this post


Link to post
Share on other sites
Yes and no.

Fundamental concepts, such as looping constructs, scope, data structures (arrays, lists, trees, graphs), the stack and heap (process stack, in particular), streams (sockets and pipes in all flavors), local data and remote data (or more particularly, cached data, core data, data that can be retrieved off the bus, and data that can be retrieved from the network) etc. (I could go on...) are conceptually the same across language implementations.

However, there are different languages outside the ADA/C family (and I include Java and C# and Objective C in there) which bring their own characteristic traits to the process of programming that can alter the way you think about the logical process of solving a problem. If you feel comfortable enough with C++ (or C or Java or C# or perl or ...) to implement any one of the other languages in this family using only the compiler and libraries of one language, then maybe you should consider learning a language outside of this group.

For example, you could learn Lisp and find the benefits of closures and macros (they're different than C macros). Building a language set particularly for the problem at hand is much easier with Lisp/Scheme languages, and allow for iterative development easier than C++ type languages (IMO). Lisp and Scheme are a little different (I won't go into details, but Lisp basically treats functions in a different namespace than symbols; with Scheme they're in the same namespace) but they both offer a similar look at a different approach at programming. Oh, and they have a "foreign function interface" to any C library, so you don't have to abandon all the coding you've ever done in the past... just call the C function (or write a C wrapper to your engine, and call that) and you're on your way.

Or, you could learn PROLOG... coding in that is like writing up a large search tree and deciding where and how to traverse it. Or, you could learn (or hone) assembly... sure, it's only fit for a certain class of compilers (portability can be an issue) but you get a more intuitive idea of finite state machines (and in the end, every computer program is a finite state machine). Or, you could learn ML... programming with that is like painting each variable with a type-name and only mixing colors in a certain way (OcaML is also interesting...) ML languages have taught me more about programming in the way that philosophy teaches you how to think about thinking.

But when you get right down to it, all of these approaches to instructing a computer what to do are Turing complete (if you don't know theory of computation, that's another useful way to appraise the "art of programming"). Knowing one language will (sometimes painlessly, sometimes with a large headache afterwards) allow you to do anything with the computer that any other language can do... sort of. Before you go asking, "but can I program Doom 4 in SNOBOL?" I'd like to repeat something I heard back when I was an undergrad:

"Cheap, Fast, Good. Pick two."

I won't try to extrapolate that phrase because the basic idea is there and you can expound on it yourself... but basically it covers what you can expect to get from a computer language or a computer programmer. I'm starting to go on a tangent here.

Bringing it on back: You're right in thinking that any language is essentially the same in "what" you can program, but they are not the same in "how" you program. Just as how spoken language can change the way you see the world, the computer language you use will shape the metaphors for how you structure your code. (I wish I knew a forum where I could talk about linguistic theory... I secretly hoped that the language indicated in the topic was "natural" language, but I knew better before clicking)

And a quick note to phil05:
I suggest you learn any one of those three, whichever one makes you feel most comfortable. The abstract of the first post is true enough -- if you know any language well enough, picking up another one when a work environment dictates it isn't that bad, it's the concepts that count. And enough companies will be offering C++ jobs in the foreseeable future that I don't think it will be much of a problem. Worse comes to worst, you can just plug it into the project as Managed C++... or use sockets to communicate between C++ code and C# or Java code... or several other solutions. Actually, phil05, have you considered learning D?

(EDIT: oops, I spent so long writing my post that phil05 deleted his post before I hit "reply"... but the statements hold enough value, I guess)

It seems that whenever I post a reply I write a novel. I think it's because I only reply to the posts that I care about answering and have a lot to say...

[Edited by - void* on June 20, 2005 2:00:46 AM]

Share this post


Link to post
Share on other sites
stick with whatever language you know the best and are most comfortable with.
It's been proven that you will be up to 30% more productive if you do so that's my advice!
Like been posted that once you learn a language others are not as difficult unless you are going from von neumann language to non von neumann.
p.s. Actually the standard game loop for c# has just recently been included in the latest jun 2005 directx sdk so switching from one language to another it's not always all that obvious I guess

Share this post


Link to post
Share on other sites
Prolog is definitely worth looking into. Even though you probably won't find much practical use for it (doesn't mean there isn't), learning it can really widen the scope of how you solve problems.

I've been toying with the thought of making a simple Prolog system in C++, so I could write Prolog in C++.

Share this post


Link to post
Share on other sites
Flowing Ooze: have you come across this project?

Amzi! Prolog C/C++

They've embedded Prolog predicates and C/C++ procedures into the same API... I haven't tried it myself, so I'm not sure if it's any good, or even what you're looking for. But, your idea of mixing Prolog and C++ constructs was intriguing.

Share this post


Link to post
Share on other sites
Quote:
Original post by void*
Flowing Ooze: have you come across this project?

Amzi! Prolog C/C++

They've embedded Prolog predicates and C/C++ procedures into the same API... I haven't tried it myself, so I'm not sure if it's any good, or even what you're looking for. But, your idea of mixing Prolog and C++ constructs was intriguing.


I hadn't seen that project before. I think it might be worth looking into. However my idea was more along the lines of using template metaprogramming to "extend" C++ to allow writing Prolog directly in C++ and using which ever programming paradigm better suits the problem at hand. I don't know if it's feasible, still just an idea I've though of at the moment. Might be good for AI in games.

Share this post


Link to post
Share on other sites
Quote:
Original post by phil05I know future computers will be fully .NET'ish, leaving C++ in the PC market place, only to assume that C++ will be no longer upgraded.

Since when did a programming language need upgrades anyway?
By the way, Microsoft apparently ditched their plans to make Longhorn 100% .NET.

And finally, is this a computer scientist asking which language he should learn? [wink]
You should know that it doesn't make a scrap of difference. You even say you've learned several languages already, so how big a deal is it if you at one point in the future have to switch from, say, C++ to C#? Or from VB to Java, if you like.

Other than that, I'd say learn some functional programming. Not because people are going to start using them for games any time soon, but because you can learn a lot from that upside down perspective on a lot of things.

Share this post


Link to post
Share on other sites
To void*:
I did? I just updated the end of my post.

Thanks for the input. I guess all languages do have their similarities but also each is made to go beyond another language. Each takes time to learn. The elementary stuff should be learned within a day, though.

I read somewhere to focus on what you feel most comfortable on. That is quite true. It makes sense to me. In that case, it's C#. I'm not much of a MS fan these days because I can never tell what their goals are. They seem to change within the hour. This is confusing to me as a programmer because I'm trying to make software hoping that my selected languages (C#/MDX) don't get deprecated within 3 years, and it already seems like Avalon will be replacing MDX. It just makes me wonder what's the point to learn it sometimes. As I said before, MS likes to 'add onto the new' rather than Sun's 'add onto the old.'

I'm sorry if I'm totally off but I've been feeling this for quite some time. I assume that's why everyone hates MS. And security reasons. I like MS's tools but they get replaced way too fast causing any programmer to go crazy. I know we live in a fast paced world, but MS never had so much competition before. I suppose its just hard for me to keep up with them.

Edit: Maybe I should just let go of my feelings and just learn it. I'm wasting too much time predicting the future.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!