# Python \<=\> ruby

**URL:** <https://rubytalk.org/t/python-ruby/2043>\
**Category:** ruby-talk\
**Created:** [28 September 2002 18:48 UTC](https://rubytalk.org/t/python-ruby/2043 "2002-09-28T18:48:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christian\_Szegedy1](https://avatars.discourse-cdn.com/v4/letter/c/6f9a4e/32.png) [@Christian\_Szegedy1](https://rubytalk.org/u/Christian_Szegedy1)\
**Post date:** [28 September 2002 18:48 UTC](https://rubytalk.org/t/python-ruby/2043/1 "2002-09-28T18:48:34Z")

</div>

FYI, I found this while googling:

[www.cs.washington.edu/homes/kd/courses/pythonruby.pdf](http://www.cs.washington.edu/homes/kd/courses/pythonruby.pdf)

---

<div class="post-metadata">

**Author:** ![Joel\_VanderWerf1](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@Joel\_VanderWerf1](https://rubytalk.org/u/Joel_VanderWerf1)\
**Post date:** [28 September 2002 19:38 UTC](https://rubytalk.org/t/python-ruby/2043/2 "2002-09-28T19:38:14Z")

</div>

Christian Szegedy wrote:

> FYI, I found this while googling:
> 
> www.cs.washington.edu/homes/kd/courses/pythonruby.pdf

See the thread starting at [http://www.ruby-talk.org/blade/37840](http://www.ruby-talk.org/blade/37840)

---

<div class="post-metadata">

**Author:** ![Mauricio\_Fernndez](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@Mauricio\_Fernndez](https://rubytalk.org/u/Mauricio_Fernndez)\
**Post date:** [28 September 2002 22:56 UTC](https://rubytalk.org/t/python-ruby/2043/3 "2002-09-28T22:56:59Z")

</div>

Just joking 🙂

> **···**
>
> –  
> \_ \_
> 
> > > \_\_ \_\_ _| |_ \_\_\_ \_ \_\_ \_\_\_ \_\_ \_ \_ \_\_  
> > > '\_ \ / _`| __/__ | '_` \_ \ / ` | ’ \   
> > > ) | (| | |_\_\_ \ | | | | | (_| | | | |  
> > > .\_\_/ \_,_|\ __|__ /| |_| |_|\__,_|_| |\_|  
> > > Running Debian GNU/Linux Sid (unstable)  
> > > batsman dot geo at yahoo dot com
> 
> All the existing 2.0.x kernels are to buggy for 2.1.x to be the  
> main goal.  
> – Alan Cox

---

<div class="post-metadata">

**Author:** ![MikkelFJ1](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@MikkelFJ1](https://rubytalk.org/u/MikkelFJ1)\
**Post date:** [29 September 2002 11:31 UTC](https://rubytalk.org/t/python-ruby/2043/4 "2002-09-29T11:31:33Z")

</div>

“Christian Szegedy” [szegedy@t-online.de](mailto:szegedy@t-online.de) wrote in message  
[news:an4t5r$fh$01$1@news.t-online.com](mailto:news:an4t5r$fh$01$1@news.t-online.com)…

> FYI, I found this while googling:
> 
> www.cs.washington.edu/homes/kd/courses/pythonruby.pdf

The above discusses the uniform access of everything is an object and  
compares to Java: Math.abs versus -3.abs in Ruby.

This reveals something I’ve only slowly grown to realize in OOP: It’s no so  
much that objects have methods as it is the fact that the object does all  
the scope resolution for you. You can have ten different functions of the  
same name but the object always know which one is relevant.

When comparing at functional language like OCaml (ignoring it’s object  
system) to Ruby, it doesn’t really matter whether you write “find obj 2” or  
you write “obj.find 2”. However, it does matter whether you write “Hash.find  
obj 2” or you write “List.find obj 2”. In other words, the functional style  
requires you to know what kind of an object you are dealing with and use the  
correct find function. But this is rendundant as the object already knows  
it, regardless of static or dynamically typed (except OCaml sometimes  
derives the type of the object based on the formal argument types of the  
function).

Templates and generics deals with the above problem. Templates require the  
object to be typed wheras Ruby stores the available functions in a class,  
which is essentially just making the type lookup at a different space and  
time.

Perhaps OO is more about scope than it is about objects and perhaps a new  
language could be designed to work on scopes rather than objects. I already  
see Ruby as more of a scope managing system than an OO language. If you look  
at Lua there is a few things in common, but Lua does not manage scope,  
whereas Ruby does in the concept of objects and classes.

Mikkel

---

<div class="post-metadata">

**Author:** ![Christian\_Szegedy1](https://avatars.discourse-cdn.com/v4/letter/c/6f9a4e/32.png) [@Christian\_Szegedy1](https://rubytalk.org/u/Christian_Szegedy1)\
**Post date:** [28 September 2002 21:09 UTC](https://rubytalk.org/t/python-ruby/2043/5 "2002-09-28T21:09:22Z")

</div>

Joel VanderWerf wrote:

> See the thread starting at [http://www.ruby-talk.org/blade/37840](http://www.ruby-talk.org/blade/37840)

Sorry! I was too quick.

---

<div class="post-metadata">

**Author:** ![Bulat\_Ziganshin](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@Bulat\_Ziganshin](https://rubytalk.org/u/Bulat_Ziganshin)\
**Post date:** [30 September 2002 08:10 UTC](https://rubytalk.org/t/python-ruby/2043/6 "2002-09-30T08:10:13Z")

</div>

Hello MikkelFJ,

Sunday, September 29, 2002, 3:31:33 PM, you wrote:

> When comparing at functional language like OCaml (ignoring it’s object  
> system) to Ruby, it doesn’t really matter whether you write “find obj 2” or  
> you write “obj.find 2”. However, it does matter whether you write “Hash.find  
> obj 2” or you write “List.find obj 2”. In other words, the functional style  
> requires you to know what kind of an object you are dealing with and use the

no, it’s dealed by overloading mechanism

> **···**
>
> –  
> Best regards,  
> Bulat [mailto:bulatz@integ.ru](mailto:bulatz@integ.ru)

---

<div class="post-metadata">

**Author:** ![Christian\_Szegedy](https://avatars.discourse-cdn.com/v4/letter/c/ebca7d/32.png) [@Christian\_Szegedy](https://rubytalk.org/u/Christian_Szegedy)\
**Post date:** [30 September 2002 09:16 UTC](https://rubytalk.org/t/python-ruby/2043/7 "2002-09-30T09:16:22Z")

</div>

Bulat Ziganshin wrote:

> Hello MikkelFJ,
> 
> Sunday, September 29, 2002, 3:31:33 PM, you wrote:
> 
> > When comparing at functional language like OCaml (ignoring it’s object  
> > system) to Ruby, it doesn’t really matter whether you write “find obj 2” or  
> > you write “obj.find 2”. However, it does matter whether you write “Hash.find  
> > obj 2” or you write “List.find obj 2”. In other words, the functional style  
> > requires you to know what kind of an object you are dealing with and use the
> 
> no, it’s dealed by overloading mechanism

OCaml has no overloading. but it would badly need it, I have seen  
an experimental implementation of it, but only for an older version  
of OCaml.

Regards, Christian
