Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualHodgman

Posted 10 August 2012 - 09:27 PM

Is a weakly typed language a "scripting language"? And if not, what is a "scripting language" compared to a weakly typed language?

"Scripting language" has different definitions depending on who you ask. Most of what you'd call "scripting languages" are weakly typed, but not all. e.g. I'd consider UnrealScript a scripting language, and it's quite similar to Java.
I'd prefer to call them "extension languages" -- e.g. many games embed a Lua VM into them, for "scripting" the gameplay. Unreal games have UnrealScript embedded into them. WebBrowsers have JavaScript. Blender/Maya have Python, etc... These languages are embedded into an application, for the purposes of extending the behaviour of that application with modifiable "scripts" (another word for "code").

Lastly, is functional programming really applicable to games? From what I understand functional programming languages have an inherent lack of state.

It's challenging if you've spent most of your time writing in non-functional styles, but the lack of state is a huge advantage when it comes to parallelism -- it means that a good compiler can automatically make your code run on many threads (in theory, anyway). Also, despite the 'no state' thing, there's still ways to interact with a stateful environment (such as stdin/stdout), or even "hello world" wouldn't be possible to write!
In the future, these languages may start becoming more popular with games programmers.

I've been hearing lambda calculus a lot when reading about functional programming. What exactly is it?

It's a branch of mathematics, which lets you perform formal reasoning about computations (and functional style code).
http://en.wikipedia....Lambda_calculus

#2Hodgman

Posted 10 August 2012 - 07:02 PM

Is a weakly typed language a "scripting language"? And if not, what is a "scripting language" compared to a weakly typed language?

"Scripting language" has different definitions depending on who you ask. Most of what you'd call "scripting languages" are weakly typed, but not all. e.g. I'd consider UnrealScript a scripting language, and it's quite similar to Java.
I'd prefer to call them "extension languages" -- e.g. many games embed a Lua VM into them, for "scripting" the gameplay. Unreal games have UnrealScript embedded into them. WebBrowsers have JavaScript. Blender/Maya have Python, etc... These languages are embedded into an application, for the purposes of extending the behaviour of that application with modifiable "scripts" (another word for "code").

Lastly, is functional programming really applicable to games? From what I understand functional programming languages have an inherent lack of state.

It's challenging if you've spent most of your time writing in non-functional styles, but the lack of state is a huge advantage when it comes to parallelism -- it means that a good compiler can automatically make your code run on many threads (in theory, anyway). In the future, these languages may start becoming more popular with games programmers.

I've been hearing lambda calculus a lot when reading about functional programming. What exactly is it?

It's a branch of mathematics, which lets you perform formal reasoning about computations (and functional style code).
http://en.wikipedia....Lambda_calculus

#1Hodgman

Posted 10 August 2012 - 07:01 PM

Is a weakly typed language a "scripting language"? And if not, what is a "scripting language" compared to a weakly typed language?

"Scripting language" has different definitions depending on who you ask. Most of what you'd call "scripting languages" are weakly typed, but not all. e.g. I'd consider UnrealScript a scripting language, and it's quite similar to Java.
I'd prefer to call them "extension languages" -- e.g. many games embed a Lua VM into them, for "scripting" the gameplay. Unreal games have UnrealScript embedded into them. WebBrowsers have JavaScript. Blender/Maya have Python, etc...

Lastly, is functional programming really applicable to games? From what I understand functional programming languages have an inherent lack of state.

It's challenging if you've spent most of your time writing in non-functional styles, but the lack of state is a huge advantage when it comes to parallelism -- it means that a good compiler can automatically make your code run on many threads (in theory, anyway). In the future, these languages may start becoming more popular with games programmers.

I've been hearing lambda calculus a lot when reading about functional programming. What exactly is it?

It's a branch of mathematics, which lets you perform formal reasoning about computations (and functional style code).
http://en.wikipedia.org/wiki/Lambda_calculus

PARTNERS