Programming C++, Games Emphasis
|
04-06-2012, 06:43 PM
Well yeah, nowadays its not such a grand thing and we have 12 year old master hackers and such but back then learning something like that at such a young age is usually quite an outstanding achievement, at that age i never even knew of programming languages
......?????
(04-06-2012, 09:44 AM)Shonumi Wrote: It seems you're talking about the semantics of language here, whereas I've been talking about abstract concepts behind them. In regards to memory management, if you learn the concepts on a low enough level, you need only examine how the language itself implements it. There's no need to completely redefine what your ideas of the stack and the heap are; you only need to see how XYZ language goes about using them.Okay, assuming you started with a language that had those concepts, it's easy to dismiss them. If you started with python, wrapping your head around C memory management is not as easy. Of course, the abstract concepts of most languages are roughly the same. Learning how you can use a particular implementation to your advantage might be very difficult, tough. The same can be said of other things like variables, arrays, file manipulation, objects, functions, etc. Every time you start a new language, you (usually) don't fundamentally shift these ideas. You just learn how the language specifies how they are used. The syntax of how the language does it is different, but the underlying ideas are largely the same. (04-06-2012, 09:44 AM)Shonumi Wrote: In C++, you know memory is used, but you have to take care of it yourself, so you learn how the language expresses that through pointers. In Python, you still know memory is used, but the language takes care of that for you, and it expresses that by exposing little to no code that deals with it manually. Their syntaxes, as a result, are different in that regard, but that doesn't change the larger idea of memory management. Memory gets allocated to things, and that memory needs to be freed by someone.Well, the python and C++ ideas of "objects" are very different. Of course it's an advantage to know either of the two languages if you want to learn the other one, but you'll have to seriously rethink your idea of an "object". (04-06-2012, 09:44 AM)Shonumi Wrote: Ultimately, what I've been saying for the past few posts is that once you know how to code, e.g. how to program on the computer, once you've got those concepts solidly put in your head, it doesn't take much to learn a new language. You just need to learn how that language does what it does, which can be relatively easy with those previous concepts in mind.For reaching a beginner level in the new language, yes. For reaching a state where you're really comfortable with the new language (and where others are comfortable with the code you write) it is not guaranteed that your previous knowledge will help you much (it might, of course, if the languages have similar concepts). (04-06-2012, 06:22 PM)DacoTaco Wrote: ...oh and btw. phyton is not a programming language imo. its a scripting language.Oh no, not *that* again. Look, here's a C interpreter, now C isn't a programming language any more either: http://root.cern.ch/drupal/content/cint Also, this compiles python-code at runtime: http://pypy.org/ Seriously tough, python is a language and you can write programs in it. So it's a programming language. "Scripting languages" focus on interactivity and are not meant to write programs longer than 20 or 30 lines in them (bash, awk, ...). I'd call those languages "scripting languages" because it fits their common use case; still, they're programming languages, too. Everything that is touring-complete is. 04-06-2012, 10:26 PM
(04-06-2012, 08:15 PM)scummos Wrote:scripting = code that you run. needs an interpreter installed. like you said,(04-06-2012, 06:22 PM)DacoTaco Wrote: ...oh and btw. phyton is not a programming language imo. its a scripting language.Oh no, not *that* again. Look, here's a C interpreter, now C isn't a programming language any more either: http://root.cern.ch/drupal/content/cint programming = no interpreter needed. i do see java as a programming language tho its in the grey zone. i do cause in the end it uses virtual machines iirc to run code. from what i know, python will always run at runtime having to need some shit to be installed to interpret it. i didn't look fully at that pypy; but if it doesn't produce executables or anything that dont require extra shit to be installed to interpret it then its cool 04-06-2012, 11:01 PM
(04-06-2012, 06:22 PM)DacoTaco Wrote: no no no no no no no. That's still semantics of individual languages, not the larger concepts behind them. If you know how a computer is supposed to manage memory, how it needs to allocate things and eventually release that memory, you have a fair idea of memory management. Like with Python, iirc, Java takes care of this for you. That doesn't change the fact that you're still putting things in memory and taking them out at some point. If you know that much, learning memory management in Java is as simple as not caring about in. In C++, though, you get your hands dirty, and you need to learn a bit more. In either case, knowing how the stack and heap, and in general how memory should work, makes learning that language easier. Inheritance is much the same. The syntax and particulars between languages are different. But if you have the idea in your head that inheritance occurs when you want one object to take the properties of another object, you can very readily pick it up in another language. You just need to learn those aforementioned particulars, not redefine what you think inheritance is on a basic level (unless that basic level wasn't nearly detailed enough). (04-06-2012, 06:22 PM)DacoTaco Wrote: ...oh and btw. phyton is not a programming language imo. its a scripting language. Well, that's just your opinion. True, its an interpreted language rather than a compiled one, but I would beg to differ that it's not a programming language. Whether you used scripts or actual applications to run some code, making the code itself is still an act of programming. In my book, if you can use a language to program, its a programming language. Quote:scripting = code that you run. needs an interpreter installed. like you said,That's not a good definition. It's very easy to pack a python script into an executable that will run stand-alone without "extra shit installed" (two lines of config file and one command). Also, try to run a C++ program without libc.so -- just because it's installed everywhere doesn't mean it's not something extra which is required. Python is installed everywhere too (in the linux world at least). Of course there's a well-defined difference between interpreted languages and compiled languages, the latter being compiled into real bytecode. Python's duck typing system makes (statically) compiling applications into bytecode totally impractical, tough, that's why it isn't done. How that should not make it a programming language is a mystery to me. Also, Java is a programming language because it uses a VM? Okay, so if I write a VM which executes python code, it'll become a programming language too, or what? ;p Oh, or let's try this definition, maybe we can agree on that one: "Scripting languages are languages that read instructions line-by-line." That's fine with me. (04-06-2012, 08:15 PM)scummos Wrote: Okay, assuming you started with a language that had those concepts, it's easy to dismiss them. If you started with python, wrapping your head around C memory management is not as easy. I started with BlitzBasic, and then I moved on to C++. I got pointers down in a couple of hours. The memory management between the two is greatly different. Once I read up on how memory is supposed to work, it was fairly easy to connect the dots. (04-06-2012, 08:15 PM)scummos Wrote: Well, the python and C++ ideas of "objects" are very different. Of course it's an advantage to know either of the two languages if you want to learn the other one, but you'll have to seriously rethink your idea of an "object". Forget about C++, Java, or any specific language. Let's just say I went and read about objects on Wikipedia or from a Computer Science book. How exactly would I seriously have to rethink my ideas of what an object is? I've looked at a lot of Python code, and even had someone at my LUG give a presentation on Python coding, specifically with making your own objects. I don't recall ever having to seriously reorder my understanding of what objects were, in any language that I've learned. (04-06-2012, 08:15 PM)scummos Wrote: For reaching a beginner level in the new language, yes. For reaching a state where you're really comfortable with the new language (and where others are comfortable with the code you write) it is not guaranteed that your previous knowledge will help you much (it might, of course, if the languages have similar concepts). And that's what I've been talking about, learning a new language rather than mastering it. Knowing the concepts I mentioned let's you pick up another one fairly quickly. Gaining confidence, or even slight expertise requires learning specifics, but a large part of many languages share similar broad concepts that are at the core of programming. (04-06-2012, 11:17 PM)Shonumi Wrote: How exactly would I seriously have to rethink my ideas of what an object is? I looked at a lot of Python code, and even had someone at my LUG give a presentation on Python coding, specifically with making your own objects. I don't recall ever having to seriously reorder my understanding of what objects were, in any language.You don't have to. But if you want to profit from the languages' features, you should. For example, functions are objects in python, so you can re-assign them, for example: Code: def f(foo, bar): Oh, and classes are objects too: Code: class foo(): pass 04-07-2012, 12:15 AM
(04-06-2012, 11:38 PM)scummos Wrote: You don't have to. But if you want to profit from the languages' features, you should. Yes, if I came into Python, C++, Java, or some other language with only general knowledge of what objects where, I wouldn't be able to use the particular features it offers right away. Nonetheless, having a good, even a rough idea of what an object is, lets me start using objects, even at a basic level, in a given language quickly. The finer points and differences of that language are then learned later. Still I don't have to relearn the entire concept of what objects are, not totally, so I can quickly jump to devoting time to those aforementioned differences. |
« Next Oldest | Next Newest »
|
Users browsing this thread: 1 Guest(s)