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


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 08-21-2011, 04:24 PM   #1
Solid State Member
 
TheGeekSquadron's Avatar
 
Join Date: Aug 2011
Posts: 13
Exclamation Dynamic Languages versus Static Languages?

What are your opinions on this highly controversial matter. I for one like Dynamic Languages for their speed, but recognise that they aren't THAT useful outside of the Scripting Environment.

I like Static Languages, as they are easier to compile down to executables, but don't like the far 'longer' syntaxes to do the same things.

I know that .py and Python in general is massively supported in Linux, so I can actually publish Linux Python applications without compatibility worries (Python is natively supported in all major, if not all altogether Linux Distributions).
__________________

TheGeekSquadron is offline   Reply With Quote
Old 08-21-2011, 08:39 PM   #2
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: Dynamic Languages versus Static Languages?

What do you mean by static and dynamic? There's not really any clear cut definition these days and it can mean a whole host of things.

See What qualifies a programming language as dynamic? - Stack Overflow
__________________

__________________
Save the whales, feed the hungry, free the mallocs.
berry120 is offline   Reply With Quote
Old 08-22-2011, 06:52 AM   #3
Solid State Member
 
TheGeekSquadron's Avatar
 
Join Date: Aug 2011
Posts: 13
Exclamation Re: Dynamic Languages versus Static Languages?

Maybe this would be easiest to explain with the use of examples:

ie Static = C, Pascal.
Dynamic = Python, Perl, LISP.
TheGeekSquadron is offline   Reply With Quote
Old 08-22-2011, 06:59 AM   #4
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: Dynamic Languages versus Static Languages?

The problem is of course that's an over simplified definition and in reality there's languages between those you've specified there. Java is the classic example - it compiles down to bytecode, but the bytecode itself is further dynamically optimised by the JIT compiler as it's running in the background. Languages don't tend to fit straight into those categories any more.
__________________
Save the whales, feed the hungry, free the mallocs.
berry120 is offline   Reply With Quote
Old 08-22-2011, 07:04 AM   #5
Solid State Member
 
TheGeekSquadron's Avatar
 
Join Date: Aug 2011
Posts: 13
Default Re: Dynamic Languages versus Static Languages?

You think so? I always took it that a language was just either:

a) Static.
b) Dynamic.

I understand what you mean that they could fit into more than 1 category though.
TheGeekSquadron is offline   Reply With Quote
Old 08-22-2011, 07:11 AM   #6
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: Dynamic Languages versus Static Languages?

Not just that, "static" and "dynamic" in themselves could refer to whether the program is compiled or interpreted, whether the type system in use can be resolved at compile time or not, even whether the necessary memory can be determined at compile time or not. It's a very, very broad definition and you can have languages that are interpreted yet statically typed, and vice versa (so would that language be static or dynamic?)

If you're talking about whether a language is compiled, interpreted or somewhere between the two - in all honesty it's an argument that's not really controversial at all these days and pretty much died out when the heated RISC / CISC argument died out over a decade ago. The crux of the matter is that different languages are designed differently for different tasks, and there are so many popular ones out there now you can pick one for the task you're doing with the type system you want, level of interpretation you want, ease of use you want, etc.

There are some that will only use languages like C / C++ on the myth that languages like Java that compile to bytecode are slow and cumbersome (again, over a decade ago sure but now it's blisteringly fast.) Interestingly the same people will usually happily use C# even though if anything it's slightly slower than Java...

In short, go with the language that you feel is right for the job!
__________________
Save the whales, feed the hungry, free the mallocs.
berry120 is offline   Reply With Quote
Old 08-22-2011, 07:16 AM   #7
Solid State Member
 
TheGeekSquadron's Avatar
 
Join Date: Aug 2011
Posts: 13
Default Re: Dynamic Languages versus Static Languages?

I am mainly a Linux User, so I find Python perfect for what I do. It is natively supported by all Distros of Linux, and so (unlike in Windows) - the user doesn't need to install Python to run the program, and you don't have to use py2exe etc. The language is High-Level, so really easy, but I find it better than C# for a lot of things as well.

I actually use VB.NET quite a bit, seeing as it's probably the easiest language, and 75% of the stuff I do, is so easy I could choose any language, so why not make it easier on myself.
TheGeekSquadron is offline   Reply With Quote
Old 08-22-2011, 07:19 AM   #8
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: Dynamic Languages versus Static Languages?

It's a popular language to get started with, though I've always found it much more suitable for quick scripts than full programs. If you're writing stuff for yourself or just under linux then it's fine, but move to windows and you have to get your users to install python - sure it's the same with Java in a way but unlike Java most people won't have Python on their machines already.

Still not a fan of VB.NET - personally I think it teaches bad habits and if you're looking to get started on the .NET front then skipping it and learning C# isn't going to be an impossible learning curve. But hey, that's just my opinion at the end of the day!
__________________
Save the whales, feed the hungry, free the mallocs.
berry120 is offline   Reply With Quote
Old 08-22-2011, 07:23 AM   #9
Solid State Member
 
TheGeekSquadron's Avatar
 
Join Date: Aug 2011
Posts: 13
Default Re: Dynamic Languages versus Static Languages?

I agree with you that it most definitely teaches very bad habits... BUT, on the plus side, it's soooo easy that for most of the stuff you do (as long as you don't get into bad habits with other languages, that is), it's fine to use, seeing as creating a simple program in VB is FAR faster than creating the same program in C, C++, etc.
TheGeekSquadron is offline   Reply With Quote
Old 08-22-2011, 07:26 AM   #10
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: Dynamic Languages versus Static Languages?

Oh definitely.

The problem is though that it's very easy to transfer those bad habits (not worrying about case, etc.) across to other languages when you start - and you have to ask is the time you may have saved with VB worth time wasted later on in your career undoing those habits when you're trying to learn another language? I always look on Perl as an "advanced" version of VB. Teaches a crapload of bad habits but it's more complicated to use and you're less likely to be introduced to it until you've done some other programming work. Personally though I rarely use it, if I need a quick script a bash script will usually do the job fine.
__________________

__________________
Save the whales, feed the hungry, free the mallocs.
berry120 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 02:52 AM.


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