Classical Chinese has some characteristics shared with combinatory logic.
If a programming language's basic syntax is a sequent of composable functions, it will show a unique aesthetic with point-free style (aka tacit programming paradigm).
Some programming languages such as APL and J were designed in this style. But at the time, people felt that this programming paradigm was too weird, and for other sake, cause they are not popular.
Recently, some people have started using point-free style in common functional languages (such as Haskell, OCaml, Scala etc). Due to the syntax of these languages is not designed for this style, it led to a need to use the tedious compose operator and bracket. However, it's undeniable that proper use of this design pattern can make the code more elegant.
Classical Chinese has some characteristics shared with combinatory logic. If a programming language's basic syntax is a sequent of composable functions, it will show a unique aesthetic with point-free style (aka tacit programming paradigm).
Some programming languages such as APL and J were designed in this style. But at the time, people felt that this programming paradigm was too weird, and for other sake, cause they are not popular.
Recently, some people have started using point-free style in common functional languages (such as Haskell, OCaml, Scala etc). Due to the syntax of these languages is not designed for this style, it led to a need to use the tedious compose operator and bracket. However, it's undeniable that proper use of this design pattern can make the code more elegant.
文言文的組合方式有不少能反映函數式編程的結構,尤其是 point-free 風格的函數式編程。 例如:「勾股個自乘並之。」 個、自乘、並 都是可組合的函數,
個
就是map/foreach
、並
就是fold/reduce
。雖然 《九章算術》以及許多算術書所描述的是算籌的操作過程,即是過程式的算法描述。但在小粒度的數學用語中,卻有很多是這種偏向函數式風格的語言。
如果對這種風格的中文編程語言有興趣,可以考慮一下如何結合這方面的設計思想,如果設計得當應該能使代碼更有漢語文法的特色 :) 但要用這種風格做好語言的設計與實現,必然會是個困難的工作,也許甚至無法達成。