Why is there so much “magic” in Perl?

前端 未结 6 1358
名媛妹妹
名媛妹妹 2021-02-02 15:18

Looking through the perlsub and perlop manpages I\'ve noticed that there are many references to \"magic\" and \"magical\" there (just search any of them for \"magic\"). I wonder

6条回答
  •  一整个雨季
    2021-02-02 15:46

    Perl's design philosophy is that simple things must be simple. This sounds good,and to some extent it is. However, there's a tradeoff involved: Making every simple thing a one-liner results in tons of special case hacks to save a few lines of code. Different people have different preferences regarding making simple operations within a language simple versus making the language specification simple. Perl is at one extreme. Java is at the other, at least among languages that people actually use. Python and C# are somewhere in between.

提交回复
热议问题