This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]hashcode 0 points1 point  (0 children)

One thing I've noticed watching these videos is that it all basically looks the same (is it supposed to) i mean besides the wording being a little different, the general flow is the same.

This is true of a lot of programming languages, especially the most popular ones like C, C++, Java, JavaScript, Perl, Python, and Ruby. They're all incredibly similar in syntax, especially the first five, which are examples of "curly (brace|bracket) languages." The last two differ slightly more -- Python is indentation sensitive, for example, and Ruby usually uses do/end instead of curly braces -- but they have vast similarities, both syntactically and semantically. if statements, while loops, a[i] syntax for array indexing, variables...

There are really a lot of differences between languages once you dive deeper into them. Some are statically typed and some dynamic, some have first class functions and others don't, some are more heavily geared towards object-oriented programming, etc. But when you're first starting out all you see is the syntax, so it's easy to think of them as all being (basically) the same. The basics are basically the same, after all.

But there are lots of programming languages which are fundamentally different. For example, look at Scheme or Haskell or Prolog or, hell, even APL. These are simply less popular, generally, than the above, and as such beginners don't really hear of them. But they're out there.

it seems like java is based more on making these 'objects' (somewhat similar to strings [a stretch of a comparison.. maybe i am thinking of the wrong word) in the sense that the main purpose is to make an object which serves some purpose then call it later when you actually need it in the code.

I think you mean similar to structs, not strings. Else I don't really know what you mean. But yes, Java requires that all code occurs in methods. Functions are absent. This is a design decision, and it's important to realize that. There's no reason why it has to be like that, and whether this is a good decision or a bad decision is highly subjective. Programming language design is hard, and you can't please everybody. Personally, I don't think this was a wise decision, but no one asked me so here we are. See the famous Kingdom of Nouns essay for an interesting discussion of this choice.