Why I chose Python over Ruby

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Xavier Morel

    #16
    Re: Why I chose Python over Ruby

    Bil Kleb wrote:[color=blue]
    > Xavier Morel wrote:[color=green][color=darkred]
    >>> 2) Ruby does not have true first-class functions living in the same
    >>> namespace as other variables while Python does :
    >>>
    >>> In Ruby you need extra syntax that ruins the "first-class-ness" :
    >>>[/color]
    >> The extra syntax is a side-effect of the parensless call of method, it
    >> doesn't mean that methods are not first-class objects.[/color]
    >
    > The parensless calls also allow one to write beautiful
    > DSLs with Ruby.
    >
    > --
    > Bil
    > http://fun3d.larc.nasa.gov[/color]
    Yes, they're a tradeoff, they have both advantages and inconvenients.

    Matz decided that the advantages were more than worth the inconvenients,
    and it is often true indeed for Matz built the language with this very
    feature (and some others) in mind.

    Comment

    • Roy Smith

      #17
      Re: Why I chose Python over Ruby

      In article <duh29a$klr$2@v ilya.larc.nasa. gov>,
      Bil Kleb <Bil.Kleb@NASA. gov> wrote:
      [color=blue]
      > The parensless calls also allow one to write beautiful
      > DSLs with Ruby.[/color]

      What's a DSL?

      Comment

      • Marcin MielżyÅ„ski

        #18
        Re: Why I chose Python over Ruby

        Roy Smith wrote:[color=blue]
        > In article <duh29a$klr$2@v ilya.larc.nasa. gov>,
        > Bil Kleb <Bil.Kleb@NASA. gov> wrote:
        >[color=green]
        >> The parensless calls also allow one to write beautiful
        >> DSLs with Ruby.[/color]
        >
        > What's a DSL?[/color]

        Domain Specific Language. It is easy to tweak Rubys syntax and semantics
        into something that looks like another language designed for a specific
        task.

        lopex

        Comment

        • Bil Kleb

          #19
          Re: Why I chose Python over Ruby

          Marcin Mielżyński wrote:[color=blue]
          > Roy Smith wrote:
          >[color=green]
          >> What's a DSL?[/color]
          >
          > Domain Specific Language. It is easy to tweak Rubys syntax and semantics
          > into something that looks like another language designed for a specific
          > task.[/color]

          For example, see Margin Fowler's articles:


          A long-form article entitled: "Using the Rake Build Language"


          Regards,
          --
          Bil
          FUN3D suite of CFD simulation and design tools

          Comment

          • Torsten Bronger

            #20
            Re: Why I chose Python over Ruby

            Hallöchen!

            Marcin Mielżyński <lopexx@autogra f.pl> writes:
            [color=blue]
            > Roy Smith wrote:
            >[color=green]
            >> In article <duh29a$klr$2@v ilya.larc.nasa. gov>,
            >> Bil Kleb <Bil.Kleb@NASA. gov> wrote:
            >>[color=darkred]
            >>> The parensless calls also allow one to write beautiful DSLs with
            >>> Ruby.[/color]
            >>
            >> What's a DSL?[/color]
            >
            > Domain Specific Language. It is easy to tweak Rubys syntax and
            > semantics into something that looks like another language designed
            > for a specific task.[/color]

            Yes, however, this is also true for Python in my opinion. It boils
            down to a matter of taste. I deliberately left C++ one year ago. I
            looked at various alternatives.

            After a short time I concentrated on Ruby v. Python. I read a lot
            of language comparisons (with both biases). Well, my conclusion
            was: All "this language has this, and this language has that" is
            pretty pointless because both languages are very similar and equally
            sophisticated. I found the appearance of Python code more
            appealing, that was all. The "fits my brain" argument is much more
            useful than all discussions about things like continuatons or
            multiple inheritance.

            The actual reason to choose Python was its set of tools, modules,
            and Usenet participants. I don't want to do something manually in
            Ruby which I could have had ready-for-use in Python just for
            infinitesimally nicer syntax. Probably I'm just too old for
            language adventures. Ruby might be good enough for me in three
            years but I want to have the full fun now.

            Tschö,
            Torsten.

            --
            Torsten Bronger, aquisgrana, europa vetus ICQ 264-296-646

            Comment

            • Xavier Morel

              #21
              Re: Why I chose Python over Ruby

              Torsten Bronger wrote:[color=blue]
              > Yes, however, this is also true for Python in my opinion.
              >[/color]
              Ruby's ability to generate DSLs is an order of magnitude better than
              Python's at least.
              I only know of the Lisp dialects that get better at DSLs.

              Check Rails' validation methods (in the models), or if you don't want to
              dwelve into rails (which I do understand), go check Why's "Dwemthy's
              Array" (http://poignantguide.net/dwemthy/) (note: you may need to read
              Why's Poignant Guide to Ruby first, the creation of the Array itself is
              fairly tough stuff with metaprogramming black magic and all).

              Comment

              • Mystilleef

                #22
                Re: Why I chose Python over Ruby

                Simple, clarity! Ruby reads like Perl's younger cousin.

                Comment

                • Torsten Bronger

                  #23
                  Re: Why I chose Python over Ruby

                  Hallöchen!

                  Xavier Morel <xavier.morel@m asklinn.net> writes:
                  [color=blue]
                  > Torsten Bronger wrote:
                  >[color=green]
                  >> Yes, however, this is also true for Python in my opinion.[/color]
                  >
                  > Ruby's ability to generate DSLs is an order of magnitude better
                  > than Python's at least.[/color]

                  If good DSL includes morphing into another language, this may be
                  true. However, I think that a good DSL just solves the problem
                  well, even if it still looks like the original by and large.

                  Tschö,
                  Torsten.

                  --
                  Torsten Bronger, aquisgrana, europa vetus ICQ 264-296-646

                  Comment

                  Working...