What's better about Ruby than Python?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • William Trenker

    #31
    Re: What's better about Ruby than Python?

    On Mon, 18 Aug 2003 03:11:20 -0600
    Andrew Dalke <adalke@mindspr ing.com> wrote regarding Re: What's better about Ruby than Python?:
    [color=blue]
    > java group:comp.lang .python from Jan 1, 2003 to today. 1,680
    > perl group:comp.lang .python from Jan 1, 2003 to today. 1,550
    > tcl group:comp.lang .python from Jan 1, 2003 to today. 470[/color]
    [etc.]

    c++ group:comp.lang .python from 1 Jan 2003 to today. 2,630

    (for what it's worth)
    Bill

    Comment

    • Lulu of the Lotus-Eaters

      #32
      Re: What's better about Ruby than Python?

      The second surest sign that a post is a troll is if the author includes:

      |> This is not a troll.

      The first surest sign that a post is a troll is if the author is:

      |"Brandon J. Van Every" <vanevery@3DPro grammer.com>


      Comment

      • Erik Max Francis

        #33
        Re: What's better about Ruby than Python?

        "Brandon J. Van Every" wrote:
        [color=blue]
        > Why do you assume that I'm asking these questions in order to
        > understand how
        > to program in either? I want to know what people's *perceptions* are.
        > Subscribe to marketing-python if you want to puzzle me out more.[/color]

        Why do you need to understand _other_ peoples' perceptions, general
        marketing trends, and Python marketshare in order to learn it? You've
        already evidently (from your post here and in other groups recently)
        decided that you're going to go with Python -- at least that's what you
        claim, I'm not entirely convinced -- so why aren't you learning the
        language instead of all these other irrelevant things?

        If you've truly decided that you're going to use Python, why aren't you
        learning the _language_ now -- something you've been putting off for
        years -- instead of hunting down all these red herrings?

        --
        Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
        __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
        / \ Principles have no real force except when one is well fed.
        \__/ Mark Twain

        Comment

        • Andrew Dalke

          #34
          Re: What's better about Ruby than Python?

          William Trenker:[color=blue]
          > c++ group:comp.lang .python from 1 Jan 2003 to today. 2,630
          >
          > (for what it's worth)[/color]

          Relevant for the OP's thoughts.

          I also tried C#, but then wondered if google would have problems
          with non-text characters, and if not, if the search for C++ would
          be biased by

          int c = 0;
          ...
          c++;

          I also excluded 'basic' since it's too often used in other contexts.
          And I totally left out lisp and scheme.

          Now to confuse searches for the future: snobol, jovial, ada,
          rebol, smalltalk, dylan, occam, objective c, apl, J, K, and
          cobol. :)

          Andrew
          dalke@dalkescie ntific.com


          Comment

          • Harry George

            #35
            Re: What's better about Ruby than Python?

            Alexander Schmolck <a.schmolck@gmx .net> writes:
            [color=blue]
            > Alex Martelli <aleaxit@yahoo. com> writes:
            >[color=green]
            > > (I do hope that Python never gets such a powerful macro system, no matter
            > > the allure of "letting people define their own domain-specific little
            > > languages embedded in the language itself" -- it would, IMHO, impair
            > > Python's wonderful usefulness for application programming, by presenting an
            > > "attractive nuisance" to the would-be tinkerer who lurks in every
            > > programmer's heart...).[/color]
            >
            > I don't think a powerful but potentially dangerous feature poses much of a
            > problem as long as there is little danger of inadvertently using it and little
            > incentive to inappropriately use it (e.g. you could do all sorts of stupid
            > things in python, like redefining __builtins__.le n, but generally there isn't
            > much of an incentive to do so, so many of the reasons why e.g. Java
            > programmers might think python an unsuitable language for larger projects
            > don't really apply in practice. My feeling is this *not* true to the same
            > extent for ruby, where similar things are both encouraged and, if I don't
            > misremember, can happen inadvertently).
            >
            > Would you still have a problem with macros in python if utilizing them
            > required some obvious and explicit mechanism (say a 'use_custom_syn tax'
            > statement right at the beginning of a module that wants to use macros), so
            > that their use could easily be controlled by e.g. project managers?
            >
            > 'as[/color]

            Yes, it is a problem under any circumstances.

            "The first step in writing a macro is to recognize that every time you
            write one, you are defining a new language". P. Norvig, "Paradigms of
            Artificial Intelligence Programming", c 1992, pg 66.

            In the Lisp world, you use the hundreds of macros in CL becuase they
            *are* the language. But home-grown (or vendor supplied) macros are
            basically a lockin mechanism. New syntax, new behavior to learn, and
            very little improvement in readability or efficiency of expresison
            (the commmon rationales for macros).

            The python language is just fine as is. If you really, really need
            something like a macro, consider a template body which is filled in
            and exec'd or eval'd at run time.

            --
            harry.g.george@ boeing.com
            6-6M31 Knowledge Management
            Phone: (425) 342-5601

            Comment

            • John Wilson

              #36
              Re: What's better about Ruby than Python?

              Alex Martelli wrote:
              [color=blue]
              > Me, I think immutable strings are
              > an excellent idea (and I'm not surprised that Java, independently
              > I think, reinvented that idea which was already in Python),[/color]

              Gosling claims that Java contains no new ideas. I have heard him say that
              every feature of Java is in at least two other programming languages. Java
              takes many things from CLU (including immutable strings). CLU looks to be an
              influence on Python too.

              John Wilson
              The Wilson Partnership



              Comment

              • Doug Tolton

                #37
                Re: What's better about Ruby than Python?

                On Mon, 18 Aug 2003 10:52:09 -0700, "Brandon J. Van Every"
                <vanevery@3DPro grammer.com> wrote:
                [color=blue]
                >Let me make myself as clear as I can. I am not the slightest bit interested
                >in yours or anyone else's philosophy of whether I should have asked the
                >question, or what manner I should have asked it. I asked a very simple
                >question, and in some cases was rewarded with very simple, helpful answers.
                >Whereas this meta-debate is a complete waste of time.[/color]

                Clearly you are interested in people's philosophical take on why you
                should've posted to the Ruby boards, because you take the time to
                respond to each and every criticism.

                It's interesting to note that you could've pre-empted the question by
                saying either "I've also posted this to the Ruby group, but I wanted
                your take" or "The Ruby group is a bunch of dunder heads and I only
                like Python programmers" etc. However your ranting and whining about
                people not answering the question to your satisfaction is amusing.

                Beggars can't be choosers my friend. You posted an antagonistic
                question to the Python board, expect to get antagonistic responses.

                Clearly people don't care if they are answering your question in a way
                that is suitable and appealing to you.


                Doug Tolton
                (format t "~a@~a~a.~a " "dtolton" "ya" "hoo" "com")

                Comment

                • John Roth

                  #38
                  Re: What's better about Ruby than Python?


                  "Andrew Dalke" <adalke@mindspr ing.com> wrote in message
                  news:bhq501$a98 $1@slb6.atl.min dspring.net...
                  [color=blue]
                  > How many Ruby programmers (per capita) do you know talking about
                  > Python? Perhaps Python "has the potential to ...display Ruby"[/color]

                  You might try getting onto some other newsgroups and mailing
                  lists that deal with more general (not language specific) issues and
                  find out exactly what people are saying. On the XP mailing lists
                  my general impression is that the Ruby programmers outnumber
                  the Python programmers, and a fair number of them came from
                  a Python background.
                  [color=blue]
                  > How many Python-aware programmers do you know who also talk
                  > about Java? Also talk about C#? About C++? About BASIC?[/color]

                  Lots. Most of the people on the XP lists use multiple languages,
                  and are quite vocal about it in the appropriate circumstances.

                  John Roth



                  Comment

                  • John J. Lee

                    #39
                    Re: What's better about Ruby than Python?

                    Erik Max Francis <max@alcyone.co m> writes:
                    [color=blue]
                    > "John J. Lee" wrote:
                    >[color=green]
                    > > Much less than a few hours? You're obviously much faster on the
                    > > uptake than me...[/color]
                    >
                    > To read and usefully absorb the tutorial in only an hour? That seems
                    > quite feasible for an experienced programmer.[/color]
                    [...]

                    Like I said. :-) Took me an afternoon.

                    Mind you, I am the type who, when faced with a new language, tends to
                    read everything slowly, chew the cud, *then* start writing. I read
                    the whole of Stroustrup and a couple of other books before writing a
                    line of C++ -- not an approach I recommend to others, but if I had to
                    do it again (heaven forfend), I'd do the same.


                    John

                    Comment

                    • Roy Smith

                      #40
                      Re: What's better about Ruby than Python?

                      Alex Martelli <aleaxit@yahoo. com> wrote:[color=blue]
                      > I do hope that Python never gets such a powerful macro system[/color]

                      I'm with Alex on this. Macros suck. What you usually end up with is
                      essentially two different languages, with different syntaxes, and which
                      don't interract very well. If nothing else, this really screws up emacs
                      auto-indenting :-(

                      One of the few things I like about C++ is that between const, templates,
                      and inline, the need for the macro preprocessor has been almost
                      eliminated. Still, you see a lot of code which goes out of its way to
                      do fancy things with macros, almost always with bad effect.

                      I don't even want to talk about the various systems which make use of
                      things like m4.

                      Why do you need macros? There's a few things people do with them:

                      1) Define constants. In Python, you just define symbols in your module,
                      and get over the fact that there really is no such thing as a constant
                      in Python.

                      2) Define efficient pseudo-functions. In Python, you just define a
                      function (or method) and get over the fact that it's not as efficient as
                      a macro. If I cared about microseconds, I wouldn't be writing in Python.

                      3) File inclusion. In Python, you don't include files, you import
                      modules.

                      4) Conditional compilation. In Python, you can conditionally define
                      anything you want at import time.

                      5) Inventing your own language constructs. In Python, you just don't do
                      this.

                      Comment

                      • John J. Lee

                        #41
                        Re: What's better about Ruby than Python?

                        "Roberto Amorim" <wolfoxbr@hotma il.com> writes:
                        [color=blue][color=green]
                        > > 6. The way Ruby handles parameterless functions as if they were
                        > > properties.[/color]
                        >
                        > That's the thing I like most about Ruby. But I couldn't get past its[/color]
                        [...]

                        Appeals to me too, but, when it comes right down to it, the only
                        reason I'm using Python and not Perl is that it has a really
                        significant reduction in baggage. There just is no such difference
                        between Python and Ruby, according to everything I've heard people put
                        forward here as 'significant'. Python has more users. Nothing more
                        to be said, as far as I'm concerned.

                        I really wish I could say more for Ruby, as I'd very much like to
                        sound less like a closed-minded programming language-monoglot.

                        In my defence, like lots of people here I'm eager to learn Haskell and
                        O'Caml, not to mention a bunch of others -- if only Python didn't do
                        almost everything so well, there'd be more motivation...


                        John

                        Comment

                        • Aahz

                          #42
                          Re: What's better about Ruby than Python?

                          In article <mailman.106123 3235.4220.pytho n-list@python.org >,
                          Lulu of the Lotus-Eaters <mertz@gnosis.c x> wrote:[color=blue]
                          >
                          >The second surest sign that a post is a troll is if the author includes:
                          >
                          >|> This is not a troll.
                          >
                          >The first surest sign that a post is a troll is if the author is:
                          >
                          >|"Brandon J. Van Every" <vanevery@3DPro grammer.com>[/color]

                          Oh, come on, Brandon is *much* less of a troll than T*m*t*y R*e. Unlike
                          the R**bot, we do some interesting topics out of Brandon, they're just
                          written with such antagonism that I'd be hard-pressed to top them.
                          --
                          Aahz (aahz@pythoncra ft.com) <*> http://www.pythoncraft.com/

                          This is Python. We don't care much about theory, except where it intersects
                          with useful practice. --Aahz

                          Comment

                          • Brandon J. Van Every

                            #43
                            Re: What's better about Ruby than Python?

                            Tom wrote:[color=blue]
                            > "Brandon J. Van Every" <vanevery@3DPro grammer.com> wrote in message
                            > news:<bhpbc6$1p lpe$1@ID-203719.news.uni-berlin.de>...
                            >[color=green]
                            >> This is not a troll.[/color]
                            >
                            > "I am not a crook." R.Nixon[/color]

                            You certainly are a waste of my time, Tom. Welcome to my killfile. I'd
                            like to think that if I'm a waste of your time, it's for different reasons
                            and not ones of my own designing.

                            --
                            Cheers, www.3DProgrammer.com
                            Brandon Van Every Seattle, WA

                            20% of the world is real.
                            80% is gobbledygook we make up inside our own heads.

                            Comment

                            • Brandon J. Van Every

                              #44
                              Re: What's better about Ruby than Python?

                              Doug Tolton wrote:[color=blue]
                              >
                              > Clearly you are interested in people's philosophical take on why you
                              > should've posted to the Ruby boards, because you take the time to
                              > respond to each and every criticism.[/color]

                              I actually can't remember that I've deliberately done that. I expect I
                              probably haven't. At any rate, I do always take the time to let people know
                              that I'm putting them in my killfile. Such as yourself. You haven't said
                              anything awful, but you also went out of your way to make an otherwise
                              content-free post at my expense. Of what use is that to me? Eventually,
                              I'll whittle this group down to people who can take a simple, rational
                              question at face value, provide the needed info, and be done with it.

                              --
                              Cheers, www.3DProgrammer.com
                              Brandon Van Every Seattle, WA

                              20% of the world is real.
                              80% is gobbledygook we make up inside our own heads.

                              Comment

                              • Michele Simionato

                                #45
                                Re: What's better about Ruby than Python?

                                "John Roth" <newsgroups@jhr othjr.com> wrote in message
                                news:<vk1c89jvd jepa4@news.supe rnews.com>...[color=blue]
                                > 3. Not having to write "self" in the method definition. This falls out of
                                > item 2: since every function/method has an instance, there's no need to
                                > declare it. I've thought of writing a PEP for this one.[/color]

                                Out of curiosity: how does Ruby manages inner classes like this?

                                class MyClass(object) :
                                def __init__(self,x ):
                                class InnerClass(obje ct):
                                def __init__(inners elf,a):
                                innerself.a=a
                                self.b=2*a
                                self.x=InnerCla ss(x)

                                c=MyClass(1)

                                print c.x.a # =>1
                                print c.b # =>2

                                an-ex-enemy-of-self-now-converted-ly-your's

                                Michele

                                Comment

                                Working...