About Scripting Languages (as a beginner)

5 replies [Last post]
Posts: 458

Hey so...

whats it all about with ruby, python, etc

i know engines etc can have stuff scriptable,
when i was young i scripted actiuve battle systems and graphical menus etc in rpg maker (ruby Tongue)

but what about myself as a rather beginner.
Is it useful to look at these languages?

can i also write them stand alone?

what do you say, is it recommended for me to learn how to write in scripting languages now?
or even to look at how to implement them in my own applications?

Posts: 73

python and ruby aren't necessarily "scripting" languages, though when scripting needs to be added they are 2 of the popular choices. they are stand alone programming languages that are each very flexible and powerful in their own right, along with damn quick to develop in. more comparable to perl than lua.

as far as learning them, sure why the hell not. i love python myself.

if you are looking at them just for scripting though i wouldnt be too concerned with it. depending on the project you're going to be seeing python, ruby, lua, jscript or some other flavor of the week language and you'll be able to pick up more than enough to get by as you go. really diving in to the language would not at all be needed in those cases.

Posts: 465

I think the term you are looking for Zanval is dynamic programming language or interpreted language. Tongue Ruby is my most favorite language even though I never use it, because the code just looks beautiful.

The thing with Ruby, PHP, Python, Javascript, Lua, etc is there isn't much support for a machine code compiler, so that leaves pretty limited choices when it comes to client side applications, Java and Flash is an exception here because most people have the VM for it.

Most high level languages are very powerful, flexible, simple to use, clean, so languages tend to dominate server environments where the virtual machine is on all the time, eliminating things like compatibility and start up time.

That or the game engine itself runs an interpreter. I'm pretty sure WoW does this with Lua for its GUI configuration, and RPG Maker for Ruby scripting. C++ has a lot of support for interpreting different languages I'm pretty sure as most interpreters are written in C, so if you want to do that you might want to look into C++.

If you are going to learn functional programming most likely you will be using a dynamic programming language like Ruby, Python, Lisp (if you like brackets). Haskell is one of the rare ones which can be compiled, but its a fully functional programming language that will probably make you go insane unless you know a lot about functional programming.

The point of most scripting languages like Ruby for instance, is they employ the principle of least surprise, or PHP in which their motto is KISS (keep it simple stupid). So once you know about dynamic typing (which takes 5 seconds to understand), you probably know all that you need to know. After that its just the wacky cool stuff which is paradigm or language specific.

Posts: 458

it all sounded good until i read my fav of the languages:
PHP

i just get insane when i cant handle a variable type specific.
with c#, c++ etc i know i have an integer.
=> i know what values i can expect.

in php its like: "enter a number"
and the user can enter "hello world"
yes, i know there must be some way to go around that.

but i personally just *love* php for that xD

but yeah I understand now.
so basically: if youre interested, take a shot!
if youre talking about these languages for scripting only you wont need to know too much...

but why did you mention functional programming?
afaik theres structural, OOP, and functional Programming.

correct me if im wrong, its what some book from school said xD

Posts: 531

bake wrote:
I think the term you are looking for Zanval is dynamic programming language or interpreted language.......

If you are going to learn functional programming most likely you will be using a dynamic programming language like Ruby, Python, Lisp (if you like brackets).

functional progamming is fast becoming my number one interest Tongue

EDIT:
just thought i'd try out haskell (usually use F#) and found this, it's pretty cool Laughing out loud

http://tryhaskell.org/

and this

http://tryruby.org/

There are 10 types of people in this world - Those who understand Binary and those who don't.

Posts: 465

zanval wrote:
it all sounded good until i read my fav of the languages: PHP

i just get insane when i cant handle a variable type specific.
with c#, c++ etc i know i have an integer.
=> i know what values i can expect.

in php its like: "enter a number"
and the user can enter "hello world"
yes, i know there must be some way to go around that.

but i personally just *love* php for that xD

but yeah I understand now.
so basically: if youre interested, take a shot!
if youre talking about these languages for scripting only you wont need to know too much...

but why did you mention functional programming?
afaik theres structural, OOP, and functional Programming.

correct me if im wrong, its what some book from school said xD

Uh yeah with PHP if you ask for a number, you should validate that its a number.

PHP will let you do type hinting, you should also document the type of the variable returned, its not as strong as static typing but it does the job ok. So far I've found using interfaces a lot more useful than dynamic typing. Forced dynamic typing especially i reckon is kinda dumb.

There's at least 50 paradigms out there, you can also have combinations, but they're the main ones yes. There aren't many machine code compilable functional programming languages, I don't really know why. Was just trying to mention some benefits of learning a "scripting language".