• Welcome to Valhalla Legends Archive.
 

Difference in languages

Started by Desire, May 14, 2006, 12:12 PM

Previous topic - Next topic

Desire

well i read about programming since i wanna learn it but what are the main differances between like vb and c++ and what would be "better" to learn as first language? any info is very appreciated. tnx

Joe[x86]

I recommend Java. C++ is too hard and VB is too discusting.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

rabbit

But you can't even spell "disgusting".  I recommend C++ as a first language.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Desire

ok and what do you base your answers on?

Banana fanna fo fanna

Python, dude.

It's a very capable language that includes lots of features, especially for Windows. That is, you won't be stuck making toy console programs for your first half a year (read: C++). Also, though it has an IDE, it is mostly just a fantastic editor, so you won't be dependent on a specific IDE to hold your hand (read: VB). It's object oriented, but doesn't force you to use the OOP model right off the bat if you don't want (read: Java). It's interpreted with an interactive prompt, so you can quickly get started and play with the language. In addition, it's not a toy language; it's used in the real world. Though it's no C, it's still quite fast for an interpreted language, and at this point, you're not going to notice the speed difference.

It's also free, and there's tons of documentation.

download at http://www.python.org
book at http://www.diveintopython.org/

MyndFyre

Quote from: Desire on May 14, 2006, 02:44 PM
ok and what do you base your answers on?

I highly recommend C# with the book C# and the .NET Platform.  C# is a good middle-ground; like Java, it's very straightforward (much more so than C++), quite a bit more powerful than Visual Basic, and it's free.

I know C++ well enough to do your basic Windows-ey stuff, but I recently picked up a book called C++ for Game Programmers that talks about efficiency issues and I found out that C++ has a lot more keywords.  It's a really cool programming language in some ways, primarily because it allows you (if you need to) get really close to the computer in terms of memory, but IMO you don't need that kind of access until you really understand what's going on behind the scenes.  That's something you can learn with C#.

I wondered when Banana was going to post about Python.  I haven't used it myself, and I'm always iffy about interpreted languages since hitting all code paths during debugging can be difficult (compilers can tell you about errors before you run the program).  I couldn't say anything about Python in particular, so that's something you'd have to evaluate on your own.

Visual Basic is something that's scorned around here and I generally share that sentiment.  It's something that is primarily used for the quick development of things like business applications, where programs need to produced very quickly.  That's not to say that the other two languages can't be used quickly, but they provide the means to provide appropriate infrastructure in code.

You'll at least see me say these things often: when programming, you want to have code that will have high maintainability (so that someone else can come in and change the code a month later and the rest of the program will work) and modularity (so that it'll work with other code easily).  These principles will almost always save you time at the end of the project.  IMO Visual Basic does not encourage this practice, which is why I don't like it.

One other tip: there is a lot of disdain around here for copying other people's code and then asking for help with it.  We'd almost always rather help you get through an algorithm (a specific path to solve a problem) than help you debug someone else's code.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Desire

aight tnx that helped a lot!! tnx for the fast replies!

rabbit

The problem with C# and VB (specifically) is that they are not cross-platform.  If you learn those as your primary and strongest language,. and one day want to write something cross-platform, you're screwed.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Banana fanna fo fanna

Oh, right, Python is cross-platform, and supports compilation to EXE.

netytan

Lisp: this language more than any other will open up your head and show you the impossible. Some of the techniques that you'll learn are amazing and will translate wonderfully into some of the more powerful languages out there; others simply aren't possible outside of Lisp. What Lisp excels most at is solving hard problems, elegantly.


It's been highly regarded in academia and research labs all over the world for a very long time and some of the most intelligent and influential programmers have raved about it.

Eric Steven Raymond had this to say about learning Lisp...

"LISP is worth learning for a different reason — the profound enlightenment experience you will have when you finally get it. That experience will make you a better programmer for the rest of your days, even if you never actually use LISP itself a lot."


There are a few other languages that you might want to look at, as mentioned Python is a pretty nice one. There's another that I'm less familiar with but am very impressed by, Ruby.

There's a great buzz right now about how Ruby may be the next Java (I'm sure they mean in popularity, not ineptitude). I think this may largely be due to the fact that its creator, Matz was at least aware of Lisp.

Some of these ideas make the supposed correlation between OO and code reuse laughable to put it lightly – I'm referring here to high-order functions and alike.

There are other very interesting languages such as Oz and Io.

Io is amazingly simple and beautiful. I expect it to become popular very soon and replace Lua in most embedded applications, but Io is powerful and complete enough to compete with heavier languages.

http://iolanguage.com/


Oz is about as perfect a language I've seen for distributed programming – networking and concurrency is made seamless and this is no easy task. Aside from there is a production quality implementation available for free at:

http://www.mozart-oz.org/


The down side to these is that they're current almost undocumented in comparison with other languages. This is a sad fact and a common problem with a lot of good languages that "no ones" ever heard of.


You have to remember that language is about expression, not about how close you work to whatever hardware your running or how likely you are to get a job from it.

For a first language I would put it to you all that this quality should be the most important.


These other languages wont teach you as much as Lisp IMO, but they will help you solve [boring] everyday problems. This might be what you're looking for in some situations so they're worth learning just for that.


If you really want to see which languages are best, look at the languages clever hackers are using and what they're doing with them.


It's a good idea to look around before committing. While your doing this be very weary of people all saying the same thing, there's usually a stupid reason for it like "my friends used it", "I learned it in School" or "I needed a job and I think programming was as good as any" etc.

Frankly anyone who tells you that C++, Java and there derivatives are good languages to learn at any point is stuck in the same realm as the ever-popular pointy-headed boss.

I'd go so far as to say there heads are lodged right up there own asses.



Take your time, pick a language that's fun and interesting, and choose for yourself!


Take care :),

Mark.

netytan

Quote from: Banana fanna fo fanna on May 14, 2006, 06:01 PM
Oh, right, Python is cross-platform, and supports compilation to EXE.

Does bootstrapping the interpreter really count as compilation, and if so the solution isn't cross platform. You also fail to mention that exe's are several MB in size even for small applications.

Py2App does a marginally better job than Py2exe but this may be because Python is already available on all modern Macs. Maybe we could quote that as a reason to use it:


Python is readily available on computers running OS X and is becoming very common on Linux – most if not all major distros ship with it installed. Hewlett Packard also used to ship with Python installed on there Windows PCs, I don't know if they do anymore.


Don't get me wrong, Pythons a nice language and one I've spent a lot of time with but I don't think that this is really viable. I'm unaware of anyone shipping commercial applications in this way... in fact I've only seen one or two small free applications using this. Most people prefer to package Python in the installer.

Mark.

Banana fanna fo fanna

Sorry. Compilation wasn't the proper term. I knew that, too, and I usually nail people for that. That's what being stuck inside all day due to flooding will do to a brain!

Learning Lisp first is a bad idea. I'm a firm believer of learning what's practical first, which will kindle your passion, and then learning Lisp, which you'll be able to recognize as beautiful, since you're already somewhat accomplished of a programmer.

And wow, we have the same taste in languages (though I'm more of a Scheme guy) - Oz and Io are great (though I still have to write some significant Oz code). Also, you might like Haskell, Erlang, Ocaml, and the ever-present Smalltalk.

netytan

I don't know, part of me would agree but I also recognize that learning Lisp once your familiar with C like languages requires you to forcefully forget everything that you thought you knew about programming. This could be avoided if Lisp was learned first, I suspect that other languages would be easier to learn then as well because you'll already be familiar with the infix notation through any experience with maths.

You also learn a concepts that carry over; though since learning Lisp I have found everything else to be lacking in several key areas: beauty, flexibility, power.

Even Python, which I was so enamored with in the past makes me want to pull out Scheme. In a lot of cases I find that I mock things up first in Lisp and then implement them in Python or whatever language I'm using, this leads to very elegant and reusable code if the language is powerful enough (of course sometimes I have to dumb it down a little because Python/Ruby/Perl/Whatever just aren't on the same level).

MIT teach Lisp to there students in a single lecture then build on the core concepts gradually, introducing different paradigms right in the same language. It seems clear to me that they do this for a reason.

I didn't have the advantage of learning Lisp first but I wish now that I had. Except that then I wouldn't know as many languages as well as I do.


I've looked at these languages before. Haskell is on my to do List along with SML (with Alice). Erlang from what I've seen is very impassive conceptually but the syntax makes my eyes bleed ;). I'll get around to it eventually. Io and Smalltalk have a lot in common but I do intend to look further at this language – I've heard some amazing things about it.


My problem is that OOP (especially class based) seems to be the biggest con I've ever come across. A way to spend hours and hours drawing intricate diagrams and interaction rather than solving an interesting problem.

People will argue that OO is at useful for creating types, but in dynamically typed languages this serves little actual point and I can get all of the abstract advantages of types in Lisp by constructing new types from primitives such as conses and procedures.

As an example I recently created a Token type for a project I'm playing with and it was far cleaner than the equivalent Ruby class. It was defined simply as a pair of function, one predicate and one action. Simple and flexible!

If the same thing had to be done in C++ or Java then the code would have been longer, uglier and not half as useful – these languages get in the way more than anything. Even in Ruby and Python it wasn't all too pretty IMO but it did take a small amount of code.


Note: I use Scheme myself, Lisp I expect you know is a family of languages, into which Scheme fits. Referring to Lisp rather than Common Lisp or Scheme is just a way to talk about all of them easily.

Later,

Mark.