What makes Ruby a dynamic language?

I am reading from time to time in several books that Ruby is a dynamic
language. I come from a .NET background where C# is considered a static
language.

What makes Ruby dynamic and what are those features?

···

--
Posted via http://www.ruby-forum.com/.

Have you tried google? If not, why not?

Type something like "what is a dynamic language" and see what you get.
The ability to find answers to your own problems before you have to
ask someone else is a good trait for a programmer.

The most important feature making Ruby a dynamic language is that you can alter classes at runtime. In C#, Java, and C++, you compile your classes and they cannot be changed after compile time. In Ruby and other dynamic languages, you can create and alter your classes while the program is running.

···

On 2012-09-01, at 14:07, Rubyist Rohit <lists@ruby-forum.com> wrote:

What makes Ruby dynamic and what are those features?

--
Uwe Kubosch
http://ruboto.org/

Hi,

There is a nice article on wikipedia that will give you a quick glance into
the subject Dynamic programming language - Wikipedia

Personally, I would name Eval, Object runtime alteration, and Reflection as
the most important features, though there are much more opinions (sometimes
very contradictive :wink: regarding this matter.

···

On Sat, Sep 1, 2012 at 3:07 PM, Rubyist Rohit <lists@ruby-forum.com> wrote:

I am reading from time to time in several books that Ruby is a dynamic
language. I come from a .NET background where C# is considered a static
language.

What makes Ruby dynamic and what are those features?

--
Posted via http://www.ruby-forum.com/\.

isn't nearly powerful like in Ruby.

···

2012/9/1 Uwe Kubosch <uwe@kubosch.no>

On 2012-09-01, at 14:07, Rubyist Rohit <lists@ruby-forum.com> wrote:

> What makes Ruby dynamic and what are those features?

The most important feature making Ruby a dynamic language is that you can
alter classes at runtime. In C#, Java, and C++, you compile your classes
and they cannot be changed after compile time. In Ruby and other dynamic
languages, you can create and alter your classes while the program is
running.

--
Uwe Kubosch
http://ruboto.org/

There is dynamic programming in Java through reflection and proxies but it

You guys aren't really answering the person's question.

···

On Sun, Sep 2, 2012 at 1:31 AM, Иван Бишевац <ivan.bisevac@gmail.com> wrote:

2012/9/1 Uwe Kubosch <uwe@kubosch.no>

On 2012-09-01, at 14:07, Rubyist Rohit <lists@ruby-forum.com> wrote:

> What makes Ruby dynamic and what are those features?

The most important feature making Ruby a dynamic language is that you can
alter classes at runtime. In C#, Java, and C++, you compile your classes
and they cannot be changed after compile time. In Ruby and other dynamic
languages, you can create and alter your classes while the program is
running.

--
Uwe Kubosch
http://ruboto.org/

There is dynamic programming in Java through reflection and proxies but

it isn't nearly powerful like in Ruby.

Careful with the wording: "dynamic programming" is a specific
algorithmic technique and has nothing to do in particular with why
Ruby is called a "dynamic language".

An important point which apparently hasn't been mentioned yet is
dynamic typing vs. static typing: in Ruby variables are typeless while
in statically typed languages they are typed.

Kind regards

robert

···

On Sat, Sep 1, 2012 at 7:31 PM, Иван Бишевац <ivan.bisevac@gmail.com> wrote:

There is dynamic programming in Java through reflection and proxies but it
isn't nearly powerful like in Ruby.

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Bingo. In statically typed languages, the compiler knows all types at
compile time. In dynamically typed ("untyped") languages, in many cases
it's not possible to know all types at compile time because they haven't
all been declared.

···

On Mon, Sep 3, 2012 at 4:32 AM, Robert Klemme <shortcutter@googlemail.com>wrote:

An important point which apparently hasn't been mentioned yet is
dynamic typing vs. static typing: in Ruby variables are typeless while
in statically typed languages they are typed.

Type system - Wikipedia

--
Tony Arcieri