作者: Bruce.
日時: 2009/5/11(03:04)
Bruce.です。

だーっ、あれもこれもやってる時間がねー

機械伯爵 さんは書きました (2009/05/10 21:54):
>  Haskellといい、いつのまにか、バックトラッキング/パターンマッチングの
> Prolog方式が微妙にはやってますね。
> 
>  関数型言語の流行って、もしかしたら表面的なモノで、実はこっち方式が本当の
> トレンドなんでしょーか。

Prolog はまあバックトラックの塊みたいなもんでしょうけど、Haskellや
Erlang ではパターンマッチはともかくバックトラックはないんじゃないでしょうか?

んで、関数型言語の流行云々に関しては、Scala って言語のデザイナーが

The answer was that Phil Wadler and I decided take some of the ideas from functional
programming and move them into the Java space. That effort became a language called
Pizza, which had three features from functional programming: generics, higher-order
functions, and pattern matching. Pizza's initial distribution was in 1996, a year
after Java came out. It was moderately successful in that it showed that one could
implement functional language features on the JVM platform.


http://www.artima.com/scalazine/articles/origins_of_scala.html

とか発言してますね。

あと、Sumの件ですけど、プログラムの参考にしたって方のページにもなぜSumでいいのか、
そうしたのかという理由は書かれていないようですし、
mathematical process of addition とかあるから積を格納する変数の名前には
やっぱりよろしくないと思うんですけど。

Sum
? ?/s?m/ Show Spelled Pronunciation [suhm] Show IPA ,noun, verb, summed, sum?ming.
?noun
1. 	the aggregate of two or more numbers, magnitudes, quantities, or particulars as determined by
        or as if by the mathematical process of addition: The sum of 6 and 8 is 14.
2. 	a particular aggregate or total, esp. with reference to money: The expenses came to an enormous sum.
3. 	an indefinite amount or quantity, esp. of money: to lend small sums.
4. 	a series of numbers or quantities to be added up.
5. 	an arithmetical problem to be solved, or such a problem worked out and having the various steps shown.
6. 	the full amount, or the whole.
7. 	the substance or gist of a matter, comprehensively or broadly viewed or expressed: the sum of his opinions.
8. 	concise or brief form: in sum.
9. 	Mathematics.
a. 	the limit of the sequence of partial sums of a given infinite series.
b. 	union (def. 10a).
10. 	a summary.

以上は
sum definition | Dictionary.com
http://dictionary.reference.com/browse/sum
から。

アキュムレーター(acc, acm)のような名前にしとけばよかったんじゃ。
そのものずばり積だと product でしたっけ?

-- 
木村浩一
  I thought what I'd do was, I'd pretend I was one of those deaf-mutes or should I?
  mail kbk [at] kt.rim.or.jp
        web  www.kt.rim.or.jp/~kbk/zakkicho/
             homepage3.nifty.com/farstar/