Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 06-14-2011, 09:19 AM   #1
Beta Member
 
Join Date: Jun 2011
Posts: 3
Default Are scripting languages harder for an Ametuer for a first programming experience?

Hi ppl of COMPUTERFORUMS,

Are scripting languages harder for an Ametuer for a first programming experience?
__________________

Ben Hopper is offline   Reply With Quote
Old 06-14-2011, 09:45 AM   #2
Fully Optimized
 
strollin's Avatar
 
Join Date: Mar 2011
Location: USA
Posts: 1,938
Default Re: Are scripting languages harder for an Ametuer for a first programming experience?

Scripting languages are usually much easier since the programmer generally doesn't need to worry about memory management, they are simpler (and less powerful) by design and many don't even require you to declare a variable before using it.
__________________

strollin is offline   Reply With Quote
Old 06-14-2011, 10:02 AM   #3
7D8
In Runtime
 
7D8's Avatar
 
Join Date: Oct 2006
Posts: 209
Default Re: Are scripting languages harder for an Ametuer for a first programming experience?

Quote:
Originally Posted by strollin View Post
Scripting languages are usually much easier since the programmer generally doesn't need to worry about memory management
the need to not "worry" about memory management exists due to Garbage Collection and has NOTHING to do with scripting languages over compiled languages. The ability to write in a scripting language may be just as complicated as a compiled language. The only difference is moving compiled files as opposed to non-compiled files.

EVERY programmer should worry about memory management to a certain degree. If you are not going to worry about Memory management than you will end up writing bad programs that leak like sieve's and you will end up getting overflows even if your language has a GC. It will catch up to you eventually.

Quote:
Originally Posted by strollin View Post
...they are simpler (and less powerful) by design...
There is nothing simpler about them aside from moving the raw source files as opposed to compiled files.

There is nothing less powerful about them. They do the same thing. For example Python.

Quote:
Originally Posted by strollin View Post
... and many don't even require you to declare a variable before using it.
you always declare variables. When you are using it, you are declaring it.

Even in something like this, which what I believe you are refering to, sTest2 is declared by the interpreter. YOU are not declaring it, but the interpreter will declare it for you.

Code:
var sTest = "hello ";
sTest2 = sTest + "world";
alert(sTest2);
but this is BAD PRACTICE in my opinion as another programmer or you in the future, will come back to this later ask: "Where is sTest2 coming from?" Only to realize that you didn't declare it. Why not just declare it? Saves time and money.

Quote:
Originally Posted by Ben Hopper View Post
Hi ppl of COMPUTERFORUMS,

Are scripting languages harder for an Ametuer for a first programming experience?
If you are a new programmer, learning on some scripting languages may be detrimental to your education. For instance, as stated above, JavaScript is so lenient that you do not have to declare a variable. This is bad (as mentioned above).

Learn a language like C, C++, C# or Java and learn how to program. Than you can have fun in scripting languages. You will have to do JavaScript anyway since you'll probably be designing web apps somewhere along the way.

So the answer to your question is they MAY be easier to some extent, but that can be bad.

If you are looking to learn an interpreted language, do not start with PHP. Start with Python if you are talking about server side languages. For client side, the obvious choice is JavaScript.
7D8 is offline   Reply With Quote
Old 06-14-2011, 10:41 AM   #4
..m.0,0.m..
Site Team
 
iPwn's Avatar
 
Join Date: May 2010
Location: USA
Posts: 3,870
Default Re: Are scripting languages harder for an Ametuer for a first programming experience?

//Moved to programming.
__________________
Me: You'd think as the dominant species we wouldn't be so effing stupid.
J: We're just intelligent enough to be completely effing stupid.
iPwn is offline   Reply With Quote
Old 06-15-2011, 09:34 AM   #5
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,001
Default Re: Are scripting languages harder for an Ametuer for a first programming experience?

Quote:
Originally Posted by tomek View Post
t
Even in something like this, which what I believe you are refering to, sTest2 is declared by the interpreter. YOU are not declaring it, but the interpreter will declare it for you.

Code:
var sTest = "hello ";
sTest2 = sTest + "world";
alert(sTest2);
but this is BAD PRACTICE in my opinion as another programmer or you in the future, will come back to this later ask: "Where is sTest2 coming from?" Only to realize that you didn't declare it. Why not just declare it? Saves time and money.



If you are a new programmer, learning on some scripting languages may be detrimental to your education. For instance, as stated above, JavaScript is so lenient that you do not have to declare a variable. This is bad (as mentioned above).
ummm...

in javascript you declare variables using var.

what would you prefere?
Code:
var sTest;
sTest = "hello ";
sTest2 = sTest + "world";
alert(sTest2);
there is nothing wrong with declaring and assigning data to a variable in the same line.

I don't know if you were trying to get another point across, or hadn't really read what you wrote properly, but neither yourself nor another programmer is going to wonder where the variable came from because it is declared at the top of the script, the interpreter didn't declare it for you, you did when you wrote VAR variable....


however I do agree that some languages will let you just start using variables without declaring them. not only can that be strange to debug later, it also means that you can fall into some terrible headaches with your typing.

color vs colour for example, whilst I (being British) would declare a variable of colour to describe the colour of something, if I were spending time writing lots of HTML, I might automatically write color.

which would be a different variable.

in those cases option explicit is your friend!
__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 06-15-2011, 10:41 AM   #6
Fully Optimized
 
strollin's Avatar
 
Join Date: Mar 2011
Location: USA
Posts: 1,938
Default Re: Are scripting languages harder for an Ametuer for a first programming experience?

Quote:
Originally Posted by tomek View Post
the need to not "worry" about memory management exists due to Garbage Collection and has NOTHING to do with scripting languages over compiled languages. The ability to write in a scripting language may be just as complicated as a compiled language. The only difference is moving compiled files as opposed to non-compiled files.

EVERY programmer should worry about memory management to a certain degree. If you are not going to worry about Memory management than you will end up writing bad programs that leak like sieve's and you will end up getting overflows even if your language has a GC. It will catch up to you eventually.

There is nothing simpler about them aside from moving the raw source files as opposed to compiled files.

There is nothing less powerful about them. They do the same thing. For example Python.



you always declare variables. When you are using it, you are declaring it.

Even in something like this, which what I believe you are refering to, sTest2 is declared by the interpreter. YOU are not declaring it, but the interpreter will declare it for you.

Code:
var sTest = "hello ";
sTest2 = sTest + "world";
alert(sTest2);
but this is BAD PRACTICE in my opinion as another programmer or you in the future, will come back to this later ask: "Where is sTest2 coming from?" Only to realize that you didn't declare it. Why not just declare it? Saves time and money.



If you are a new programmer, learning on some scripting languages may be detrimental to your education. For instance, as stated above, JavaScript is so lenient that you do not have to declare a variable. This is bad (as mentioned above).

Learn a language like C, C++, C# or Java and learn how to program. Than you can have fun in scripting languages. You will have to do JavaScript anyway since you'll probably be designing web apps somewhere along the way.

So the answer to your question is they MAY be easier to some extent, but that can be bad.

If you are looking to learn an interpreted language, do not start with PHP. Start with Python if you are talking about server side languages. For client side, the obvious choice is JavaScript.
I don't want to argue point-for-point, I stand by what I said. I didn't say it was good or bad, I just stated facts. The OP asked if scripting languages were harder and I explained why I felt they were easier to learn. The question wasn't which would help him become a better programmer. There's also a myriad of stuff to deal with in order to compile and link non-interpreted languages.

Some examples:

Batch file
Code:
ECHO Hello World!
Python
Code:
Print "Hello, world!"
C++ Program
Code:
#include <iostream> 
using namespace std;  

int main () 
{   
   cout << "Hello World!";
   return 0; 
}
Which would be harder to learn? Which is more powerful?
strollin is offline   Reply With Quote
Old 06-15-2011, 01:17 PM   #7
Baseband Member
 
Join Date: Jun 2011
Posts: 30
Default Re: Are scripting languages harder for an Ametuer for a first programming experience?

Quote:
Originally Posted by strollin View Post
Some examples:

Batch file
Code:
ECHO Hello World!
Python
Code:
Print "Hello, world!"
C++ Program
Code:
#include <iostream> 
using namespace std;  

int main () 
{   
   cout << "Hello World!";
   return 0; 
}
Which would be harder to learn? Which is more powerful?

Batch file
Code:
ECHO Hello World!
<-Easiest to learn yet isn't powerful at all.
Python
Code:
Print "Hello, world!"
<----- Easy to learn. Not as powerful as C++ yet very utile.
C++ Program
Code:
#include <iostream> 
using namespace std;  

int main () 
{   
   cout << "Hello World!";
   return 0; 
}
<---- Most powerful of the aboves yet hardest to learn.

Theres an upside and downside to all of these. In my opinion don't learn BATCH because barely anybody uses it, Python would be great to learn and C++ would also be great to learn. I've used Java, Python and C++ source codes to make a game once. So, they're all great to learn in any case.
JacobP is offline   Reply With Quote
Old 06-15-2011, 03:17 PM   #8
7D8
In Runtime
 
7D8's Avatar
 
Join Date: Oct 2006
Posts: 209
Default Re: Are scripting languages harder for an Ametuer for a first programming experience?

Quote:
Originally Posted by root View Post

I don't know if you were trying to get another point across, or hadn't really read what you wrote properly, but neither yourself nor another programmer is going to wonder where the variable came from because it is declared at the top of the script, the interpreter didn't declare it for you, you did when you wrote VAR variable....
Root, I think it is you who mis-read. Of course you use var to declare a variable. That's what you are supposed to do. In the event that you don't, the interpreter will declare the variable anyway. This is not good. I don't know how much experience you have in debugging others code, but this can be a nightmare as your search through hundreds or thousands of lines of code you didn't write, to see where a variable may be coming from.

the statement i was responding to was:

Quote:
Originally Posted by strollin View Post
many don't even require you to declare a variable before using it.

Quote:
Originally Posted by strollin View Post
I don't want to argue point-for-point, I stand by what I said. I didn't say it was good or bad, I just stated facts. The OP asked if scripting languages were harder and I explained why I felt they were easier to learn. The question wasn't which would help him become a better programmer. There's also a myriad of stuff to deal with in order to compile and link non-interpreted languages.

Some examples:

Batch file
Code:
ECHO Hello World!
Python
Code:
Print "Hello, world!"
C++ Program
Code:
#include <iostream> 
using namespace std;  

int main () 
{   
   cout << "Hello World!";
   return 0; 
}
Which would be harder to learn? Which is more powerful?
fair enough
7D8 is offline   Reply With Quote
Old 06-16-2011, 12:41 PM   #9
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,001
Default Re: Are scripting languages harder for an Ametuer for a first programming experience?

Quote:
Originally Posted by tomek View Post
Root, I think it is you who mis-read.
yes, you're right, I saw you declare stest and didn't even notice stest2 thus proving your point.

What I would say though is that it's wrong to say that scripting languages are bad because of this. they just aren't.

Sloppy coders will be sloppy coders, forcing them to declare variables is only going to improve a single part of their work. the rest of it is still likely to be horrible to debug.

as for searching through hundreds, or thousands of lines, I agree, a pain, but that's why there are search tools available.
I mean you're still going to need to find where the variable is assigned a value if there is a problem with the value. so you'll still be searching the same code.

Quote:
Theres an upside and downside to all of these. In my opinion don't learn BATCH because barely anybody uses it, Python would be great to learn and C++ would also be great to learn. I've used Java, Python and C++ source codes to make a game once. So, they're all great to learn in any case.
if there was only a choice of batch, python of C++ I'd learn to write batch files first. then I'd learn to write c++.

Python is still just a scripting language.

And it's not as ubiquitous as a command line interperator

c++ is difficult to learn, but it is worth learning.
and perfectly manageable at home given enough time and the right way of learning it (breaking it down into little blocks).

people that say I need to learn C++ so I can write games are (in my experience) destined to never learn either how to write games, or learn C++.

people who say, I want to make a program that says Hello world.
then go on to write a program that says are you a dick and moves the no button etc
then goes on to write a program that can read some simple values from a text file, then write simple values from a text file, then send simple text over a network connection, and receive simple data from a network connection etc etc etc.

they are the ones who are wise enough to break down a huge subject into manageable chunks.
and they've got some basic building blocks of a simple game,
put data on the screen, sense inputs and react to those inputs, communicate with other "players" and save data.



Basically, my opinion is... learn whatever you need to get the job done, but have the knowledge to be able to break your job down into manageable chunks.
__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 06-16-2011, 01:16 PM   #10
Baseband Member
 
Join Date: Jun 2011
Posts: 30
Default Re: Are scripting languages harder for an Ametuer for a first programming experience?

Code:
#include <iostream>
using namespace std;

int main()
{
    cout << "I'm my only friend";
    int a, b, c;
    a = 2;
    b = 3;
    c = 4;

    int d;
    d = a + b + c;

    cout << d;
return;

}
Lol, on the topic of C++, I was just going to post this but I noticed something was wrong. Anyways this just shows how it can be used aa bit.
__________________

JacobP is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 09:11 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0