What do you mean by the expressiveness of a programming language?

前端 未结 11 1952
眼角桃花
眼角桃花 2021-01-31 07:56

I see a lot of the word \'expressiveness\' when people want to stress one language is better than the other. But I don\'t see exactly what they mean by it.

  • Is it
11条回答
  •  眼角桃花
    2021-01-31 08:25

    Generally speaking, with a programming language which is turing complete you can do anything that another turing complete language can do. That being said, some can do it a lot better than other.

    I take expressiveness to mean how much you can say easily, and how well / clearly it can be said. The ability to be terse is part of that ( a very powerful and terse language is one like J ). Generally I find that being concise is a good marker of being expressive. If the language can express a complex operation in a simple manner, it's going in the proper direction.

    As to the power, expressiveness isn't all the power of a language. While it may be part of it, speed, security, stability, all of those things factor in as well.

    example: summation of a list in Common lisp using the loop operator is concise and expressive

    (loop for x in list sum x)

提交回复
热议问题