Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: RFC: Simulating Ruby's "yield" and "blocks" in Perl

by curiousmonk (Beadle)
on Apr 23, 2013 at 03:29 UTC ( [id://1030030]=note: print w/replies, xml ) Need Help??


in reply to Re: RFC: Simulating Ruby's "yield" and "blocks" in Perl
in thread RFC: Simulating Ruby's "yield" and "blocks" in Perl

Are languages like Perl, Python, Ruby, Javascript not all "essentially" the same?

Mathematically, yes they are all the same. But that is not what we are talking here.

When a syntax feature is being added to a language. We generally discuss how that can help users avoid writing repeated patterns of code.

  • Comment on Re^2: RFC: Simulating Ruby's "yield" and "blocks" in Perl

Replies are listed 'Best First'.
Re^3: RFC: Simulating Ruby's "yield" and "blocks" in Perl
by morgon (Priest) on Apr 23, 2013 at 22:39 UTC
    Mathematically, yes they are all the same.
    What is that supposed to mean? How do you "mathematically" compare programming languages (and yes I do know about denotational semantics)?

    The point I was trying to make is that when you abstract away inessential syntactic differences then Perl, Ruby and Python are the same - and I still subscribe to that view.

    During the history of computing several programming paradigms have evolved, so we have the imperative paradigm (the C family if you want), the functional paradigm with or without strong type-systems (Lisp, Haskell), the logical paradigm (Prolog) the OO-Paradigm (Eiffel) and of course all sorts of cross-breeds.

    So if you look at the whole range of languages from assembler to C and C++, Lisp, Haskell, Prolog and so on the ecological niche of Perl, Python and Ruby is exactly the same - a few syntactical differences notwithstanding (and speed comparisons of concrete implementations are for this discussion entirely irrelevant).

      What is that supposed to mean? How do you "mathematically" compare programming languages (and yes I do know about denotational semantics)?

      All languages are same in a mathematical sense, that what you can do in one turing complete language you can do in another. Albeit with a lot of pain and kungfu

      when you abstract away inessential syntactic differences...

      Firstly, those are not 'inessential' syntactic differences. Because the very purpose Perl was invented was to solve some very essential problems. Problems both at both programmer level and the problems programmers try to solve. This continues to be the case till today.

      So if you look at the whole range of languages from assembler to C and C++, Lisp, Haskell, Prolog and so on the ecological niche of Perl, Python and Ruby is exactly the same

      You keep talking about 'small syntactical differences'. Those are not small. I solved a very pressing P1 issue on production today morning with Perl in something like 25 minutes. I can't imagine doing that in C++. Its just not possible!

      Lastly, I think you are stuck in this principle called Occam's razor- Which basically says "All things being same, the simplest thing turns out to be the best". The only problem is there are more than one condition to be considered while deciding if two things are the same

      There is a difference between ecological niche and genetic relationship.

      Giraffes and elephants both live in the African savanna but share less genes than African zebras and Mongolian horses do.

      Cheers Rolf

      ( addicted to the Perl Programming Language)

        I appreciate that you want to have the last word but I don't really care too much about it.

        If you want to maintain that there is such a big "genetical" difference that's fine with me - for me that is not a deep insight but a judgement of taste expressed in a non-standard way.

        As all the concepts involved are pretty fuzzy the whole discussion is moot anyway...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1030030]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-24 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found