What is “Orthogonality”?

前端 未结 17 1552
离开以前
离开以前 2020-12-12 09:42

What does \"orthogonality\" mean when talking about programming languages?

What are some examples of Orthogonality?

17条回答
  •  伪装坚强ぢ
    2020-12-12 09:49

    If you have a set of constructs. A langauge is said to be orthogonal if it allows the programmer to mix these constructs freely. For example, in C you can't return an array(static array), C is said to be unorthognal in this case:

    int[] fun(); // you can't return a static array.
    // Of course you can return a pointer, but the langauge allows passing arrays.
    // So, it is unorthognal in case.
    

提交回复
热议问题