ã¿ãªããããã«ã¡ã¯ïŒ
æè¿ã次ã®C ++ Siberia 2019ãããã·ãã«ã¹ã¯ã§éå¬ãããŸããã ãã®æ©äŒã«ã2人ã®ã¹ããŒã«ãŒãšè©±ãããŸããããããã®ã¹ããŒã«ãŒã¯ããã«ã¢ã¹ã¯ã¯ã§èŠãããšãã§ããŸãã
Ivan Chukicã¯ãKDEã®éçºè
ã®1人ã§ãããããªã°ã©ãŒã倧åŠã®ããã°ã©ãã³ã°èšèªèšèšã®æåž«ããã³ç 究è
ã§ãã
Alexander Granin ïŒ graninas ïŒã¯ãããã·ãã«ã¹ã¯FPã³ãã¥ããã£LambdaNskã®äž»å¬è
ã§ãããFPãå°éãšããæåãªã¹ããŒã«ãŒå
Œéçºè
ã§ãã
ã»ã«ã²ã€ïŒã¿ãªãããããã«ã¡ã¯ãç¥ãåãã«ãªããŸãããã Alexanderã¯ãã®C ++ Siberiaã®åºèª¿è¬æŒè ã§ãããIvanã¯æšå¹Žã®åºèª¿è¬æŒè ã§ããã é¢æ°åããã°ã©ãã³ã°ã«ã€ããŠè©±ããŸãããã ç§ãèŠããŠããéãã§ã¯ãC ++ã®FPã¯ãããªãã®åã®åºèª¿è¬æŒã§ããIvan ...
ã¢ã€ãŽã¡ã³ïŒå®å šã§ã¯ãªããéšåçã«-ã¯ãã
SergeyïŒãããŠãã¬ããŒãã®Alexanderã®ãããã¯ã¯ãé¢æ°åããã°ã©ãã³ã°ã«ã€ããŠã§ãã ãããã£ãŠãç§ã¯ããã€ãã®è³ªåãçšæããŸãããæåã®è³ªå-ã©ã®ããã«AFã決å®ããŸããïŒ
ã¢ã¬ã¯ãµã³ããŒïŒ AFã®ãæ£ãããå®çŸ©ã¯1ã€ããªããšæããŸãããå人çã«èšãã°ãAFã¯æ©èœçãªæ§æãšäžæµã®æ©èœãåãããã®ã§ãã
IvanïŒåæããŸãããããé«æ¬¡ã®é¢æ°ãè¿œå ããŸããä»ã®é¢æ°ãåŒæ°ãšããŠåããçµæãšããŠè¿ãããšãã§ããé¢æ°ã§ãã
Sergey ïŒCã®é¢æ°ãžã®ãªã³ã¯-ããã¯èæ ®ãããŸããïŒ
IvanïŒããããCã¯é¢æ°åããã°ã©ãã³ã°èšèªã§ã¯ãããŸãã:-)
ã»ã«ã²ã€ïŒçç±ãæããŠãã ããã
IvanïŒé¢æ°ãã€ã³ã¿ã®çµã¿åããããæ°ããé¢æ°ãäœæããããšã¯ã§ããªããããæ¢åã®é¢æ°ãã€ã³ã¿ã®ã¿ãæãããšãã§ããŸãã ãã¡ãããäžéšã®ã¢ã»ã³ãã©ãŒããã¯ã䜿çšãããªãã£ãå Žåã
SergeyïŒçŽ æŽããããä»å ¬åŒã®çãããããŸãïŒ æ¬æ Œçãªæ©èœãããããã人ã ã¯åžžã«Cãé¢æ°åããã°ã©ãã³ã°èšèªã§ã¯ãªãçç±ãåžžã«è³ªåããŸãã ãããŠãããã«C ++ãããç解ããããé¢æ°åèšèªã§ããçç±ããããŸã...
AlexanderïŒ C ++ãæ¬åœã«æ©èœçãªããã°ã©ãã³ã°èšèªã§ãããšã¯èšããŸããã1ã€ã®èšèªã«æ³šã蟌ãŸãããã©ãã€ã ã®æããµããŒãããŸãã
SergeyïŒã€ãŸããC ++ã¯æ©èœçãªãã©ãã€ã ããµããŒãããŠããŸãã ãšããã§ããªãã§ããïŒ é«éé¢æ°ãæäœã§ããã®ã§ã圌ã¯ããããµããŒãããŸããïŒ
IvanïŒããã§ãããC ++ 98ã§ããSTLã§ãé«éé¢æ°ãæ¢ã«ååšããŠããã®ã§ã圌ã¯ãã€ãããã§ããã ããã¯æã䟿å©ãªé¢æ°åèšèªã§ã¯ãããŸãã-FP以äžãå®è£ ããèšèªããããŸãã ããããç§ã®ããŒãºã®ããã«ãããã¯åžžã«ããªãæ©èœçã§ããã
ã»ã«ã²ã€ïŒãããããã®å Žæãããã詳现ã«ã ããªãã®ããŒãºã¯äœã§ããïŒ
IvanïŒè€éã§ãã ããã話ãããŠãã ããã ç§ã倧åŠã«ãããšããç§ãã¡ã¯LISPã䜿ããŸãããããã®LISPã¯ISPãã®ã§èª°ããå«ãã§ããã ããããããããç§ãç解ããã®ã¯ãLISPã³ãŒãã§Cæ§é ãçŽæ¥ã·ãã¥ã¬ãŒãããæ¹æ³ã§ãã ãããŠãããæ¥ãçµã¿èŸŒã¿ã®foreach
ãªã©ã®ããã«ãªãªãŒã¹ãããJavaã®æ°ããããŒãžã§ã³ããªãªãŒã¹ãããŸãããç§ã¯ãæ°ããã³ã³ãã€ã©ãèšèªã®æ°ããããŒãžã§ã³ããããŠå€§åŠã§LISPã§è¡ã£ãããšãå®è£
ããããã«æ°ãããã®ããã¹ãŠå¿
èŠã ãšèããŸãããéåžžã¯ã«ãŒãããµããŒãããŠããŸããã ãã®ç¬éãç§ã¯FPãé«ã¬ãã«ã®æœè±¡åãæ§ç¯ããã®ã«éåžžã«è¯ãããšã§ããããšã«æ°ã¥ããŸããããããŠãããç§ã2019幎ã«æ©èœçãªC ++ã䜿çšããçç±ã§ãã
SergeyïŒå®éãé«ã¬ãã«ã®èšèšã«ã¯FPã䜿çšããŠããŸãã
ã¢ã€ãŽã¡ã³ïŒãã®ãšããã§ãã
AlexanderïŒçŸåšãç§ã¯C ++ã§ã¯åäœããŸããããããŒã¿ã®æäœã«äœ¿çšããããšãæåŠããŸãããããã¯åœä»€åã¢ãããŒããããã¯ããã«å¿«é©ã§ãã ãããšã¯å¯Ÿç §çã«ãOOPãšæ¯èŒããå Žåã§ããããã§ã¯å€æã®ã¿ã蚱容ãããããã¯äŸ¿å©ã§ãã
SergeyïŒ FPã¯C ++ã ãã§ãªã䜿çšã§ããŸãããïŒ ã§ã¯ã次ã®è³ªåïŒC ++ã®ã©ã®éšåã䜿çšããŠããŸããïŒ èšèšäžã®åé¡ã®ã¿ãéèŠãªå Žåã¯ãFPã«é©ããéšåã®ã¿ãéžæã§ããŸããããã¯å®éã«äœ¿çšããéšåã§ãã
IvanïŒãããã¯ééããªãã©ã ãé¢æ°ã§ãã ããã«éèŠãªã®ã¯ããã³ãã¬ãŒããä»ã®é¢æ°ãåŒæ°ãªã©ã«æž¡ãããšãã§ããããã§ããã©ã ãã¯ãæ©èœãªããžã§ã¯ããäœæããããã®åªããæ§æã§ãã
ã»ã«ã²ã€ïŒã¯ããããªãã¯ã©ã ããæ¬åœã«å¥œãã ãšãã§ã«æ°ä»ããŸãã:-)
IvanïŒåœŒããæ¬åœã«æ°ã«å ¥ã£ããšããããã§ã¯ãããŸããããããã¯æããã«C ++ 98ã§ç§ãã¡ãæã£ãŠããæé«ã®ãã®ã§ããã圌ããšäžç·ã«ä»äºãããæ¹ã䟿å©ã§ãã
AlexanderïŒã¯ããç§ãã©ã ãã奜ãã§ã-ãã®æ©èœã¯éåžžã«æ®éçã§ããããããããã ãã§æžãããšãã§ããŸãã ããã¯ãä»»æã®ããžãã¯ãæ§ç¯ã§ãããŠãããŒãµã«ã³ã³ãããŒã¿ã®ãããªãã®ã§ããä»ã®èšèªã»ã©çŸããã¯ãªããããããŸããããããã»ã©æçšã§ã¯ãããŸããã
SergeyïŒ IvanãC ++ 11ããåã®æšæºãããšãã°éåžžã«äžè¬çãªC ++ 03ãªã©ããããããã«ã¯ãã§ã«æ©èœçãªæ©èœãããããšã«æ³šæããŠãã ããã ãããŠãæ°ããæšæºã«ã¯ããæ©èœçãªæ©èœããããŸã... C ++ãFPã«åãã£ãŠãããšèšãããšã¯å¯èœã§ããïŒ ãã®åãã¯ç¶ãããæ¢ãŸããŸããïŒ ãããŠãããã¯äœã«ã€ãªãããŸããïŒ
IvanïŒããã°ã©ãã³ã°èšèªå šè¬ã«é¢ããSimon Peython Jonesã®åªããå ±åãããã圌ã¯ããã«å€ãã®å®å šãªèšèªãšäœ¿çšãããŠããèšèªã瀺ãã°ã©ããæããŸããã Haskellã¯ãäœãã§ããªãå®å šã«å®å šãªèšèªãšããŠç©èªãå§ããŸãã-I / OããªãããŸã£ããäœããªãããã§ãã SPJã¯ãCèšèªãšã¢ã»ã³ããªèšèªãéåžžã«æçšã§ãããšåæã«éåžžã«å±éºãªãã®ãšããŠåé¡ããŸããã ãã以æ¥ãHaskellã¯ã»ãã¥ãªãã£ã®åŒ·åã«åããŠåãå§ããŸããã äžæ¹ãC ++ã«è¡šç€ºããããããã®æ©èœã¯ãäž»ã«ã»ãã¥ãªãã£ãåäžãããæ£ããããã°ã©ã ãããç°¡åã«äœæã§ããããã«èŠããŸãã ãã®ããããããã®ã»ãšãã©ã¯é¢æ°åããã°ã©ãã³ã°èšèªã«ç±æ¥ããŠããŸãã
ã»ã«ã²ã€ïŒã©ãããŠããæããŸããïŒ AFã®æ§è³ªã®ããã§ããïŒ
IvanïŒã¯ãããã¶ãæ¬è³ªçã«ã¯âŠã§ããç§ã«ã¯ããããŸããã
ã¢ã¬ã¯ãµã³ããŒïŒãã³ãã¬ãŒãã«èŠåŽãããããã€ããåé 眮ããããäœããã®äœã¬ãã«ã®ããã¿ã«ããããããŠãããããããAFããã¹ãŠã®äººãé äºããŠãããšæããŸãã
ã»ã«ã²ã€ïŒã€ãŸããããªãã«ãšã£ãŠããã¯äžçš®ã®ç¥çéåã§ããïŒ
ã¢ã¬ã¯ãµã³ããŒïŒã¯ããããã§ãã
ã»ã«ã²ã€ïŒããããŸããã 銬鹿ããæšæºæ©èœãå®è£ ããããããéçºè ãé«ã¬ãã«ã®æœè±¡åã«ã€ããŠèããã®ãã©ãã»ã©é¢çœãã-ããã¯äžå¿«ã§ãã 次ã«ãããã質åCã§ããC++ã§ã®FPã®å®çšçãªã¢ããªã±ãŒã·ã§ã³ã®çµéšã¯ãããŸããïŒ æ¬çªãããžã§ã¯ãã¯ãããŸããïŒ
ã¢ã€ãŽã¡ã³ïŒãã¡ããã§ãã äžçæ倧ã®ãããžã§ã¯ãã®1ã€ã§ããKDEã«ã¯ãæ©èœã¹ã¿ã€ã«ãéäžçã«äœ¿çšããããã€ãã®éšåããããŸãã ãã¡ãããããã¯ãåŸæ¥ã®ãªããžã§ã¯ãæåã®C ++ãšäžé£ã®æ©èœæŠå¿µãçµã¿åããããã®ã§ãã ç§ã¯æ±ºããŠçŽç²äž»çŸ©è ããã®ãããªãã®ã«ãªãã€ããã¯ãããŸããã§ããã ç§ã¯åžžã«æé«ã®ç°ãªãäžçãçµã¿åãããããšããŸãã
SergeyïŒ HaskellãScalaã¯ã©ãã§ããïŒ çµå±ã®ãšããããããã¯æ¬çªç°å¢ã§åºã䜿çšãããŠããŸãã Haskellã¯ä»ãé¢æ°åèšèªã®æšæºãšèŠãªãããŠãããšããèããã©ã®ããã«æ°ã«å ¥ã£ãŠããŸããïŒ ããã¯ç¹ã«çŽç²äž»çŸ©è ã«ãã£ãŠæ³šç®ãããŠããŸãã
ã¢ã€ãŽã¡ã³ïŒã¯ããä»æ¥ã®Haskellã¯FPã®å矩èªã§ããããšã«åæããŸãã å®éãHaskellã®æ©èœã¯ãã¹ãŠãFPã«é¢é£ãããã®ãšããŠäººã ã«èªèãããŠããŸãã ããã¯å¿ ãããçå®ã§ã¯ãããŸããããHaskellã¯æ¬åœã«æã人æ°ã®ããã¢ã«ãããã¯é¢æ°åããã°ã©ãã³ã°èšèªã«ãªã£ããšæããŸãã ãã³ãã³ãšåãšãŒãããã®ããã€ãã®éè¡ãHaskellãåºç¯ã«äœ¿çšããŠããããšã¯ç¥ã£ãŠããŸãããçŸåšScalaã¯ã¯ããã«äººæ°ããããŸãã
ã¢ã¬ã¯ãµã³ããŒïŒ Scalaã®æ¹ã人æ°ãããããšã«åæããŸãããHaskellã¯ããæ©èœçãªèšèªã®ããã§ããã®æ©èœã®ã»ãšãã©ã¯ããæ£ããå®è£ ãããŠããŸãã ã€ãŸããç°¡åãªã«ã¬ãŒã䜿çšããå Žåãäœæ²ãç°¡åã«è¡ãæ¹æ³ãããå Žåãããã°ã©ãã³ã°ã¯ç°¡åã§ã·ã³ãã«ã«ãªããŸãããŸãã§æ£®ã®äžãæ©ããŠæ¯è²ã楜ãããããªãã®ã§ãã
ã¢ã€ãŽã¡ã³ïŒããããæã 森ã®äžã«ã¯ããããŸãã ããªãããã·ã¢ã«ãããªãã
SergeyïŒ C ++ã¯äž»ã«Haskellã«è§ŠçºãããŠãããšæããŸããïŒ ããã¯äŸ¡å€ããããŸããïŒ
IvanïŒç¹å®ã®å§å¡äŒã®ã¡ã³ããŒã«ã€ããŠã»ã®ããããŠããŸããïŒ :-)誰ããã¯ã©ã¹ã¯ã©ã¹ãç解ããçµæãšããŠã³ã³ã»ãããçãŸãããšã»ã®ããããŸãããããã§ã«ã³ã¯ããããæ¢ããã³ã³ã»ãããã¯ã©ã¹ã¯ã©ã¹ãšã©ã®ããã«ç°ãªããã«ã€ããŠã®ææžãæžããŸããã ç§ã®èŠ³ç¹ããã¯ããããã¯ãã¹ãŠãç°ãªããŸãããåãç®çãæãããŸãã ç°ãªãã¢ãããŒãã
SergeyïŒå°æ¥/çŽæã¯äœããã®åœ¢ã§FIã«é¢é£ããŠããŸããïŒ Bartoshã¯ããããã¯å®è£ ãäžååãªã¢ããã§ãããšäž»åŒµããŠããããã§ãã
IvanïŒãããã¯ãããããã¯ã¢ãããšããŠå®è£ ãããç¶ç·šãéä¿¡ããŸããããã®åé¡ã§äœãæãéèŠãããããŸããã
SergeyïŒ C ++ã§æ¹åãããã¢ãããµããŒããå¿ èŠã§ããïŒ
AlexanderïŒãã¡ãããããã¯C ++ãæ¬åœã«è¯ãèšèªã«å€ããããšãã§ããæãéèŠãªæ©èœã§ãã
IvanïŒãšããã§ãç§ãã¡ã¯ã«ã³ãã¡ã¬ã³ã¹ã«åå ããŠããã®ã§ã質åããããŠãã ãããã»ã«ã²ã€ã äŒè°ã¯åºæ¿çãªä»äºã ãšãã£ããããŸããã ããã«ã€ããŠãšãŠãèå³æ·±ãããšãå ±æããŠãã ãããäžçã®ä»ã®å°åã§ç¬ç«ããŠäŒè°ãéå¬ããããã«ãç§ãŸãã¯ã°ã©ãã³åå¿ã«ã¢ããã€ã¹ããŠããããŸããïŒ
SergeyïŒäŒè°ã®éå¬ã¯æ¬åœã«ã¯ãŒã«ã§ãå€ãã®èå³æ·±ã人ã ã«äŒããŸãããããã¯æ°·å±±ã®äžè§ã«ãããŸããã ãããŠããã«-å€ãã®ä»äºãããŒã«ã®ãã¹ãŠã®æºåãåå è ã®ããã®é£ã¹ç©ãã¹ããŒã«ãŒã®æ€çŽ¢ã¯èšããŸã§ããããŸããã C ++ãã·ã¢ã¯ãŸã äžçã§æãæåãªäŒè°ã§ã¯ãããŸãããã¹ããŒã«ãŒã¯ãç§ãã¡ãæ°ããäŒè°ã§ãããèå³æ·±ãããšãããã§èµ·ãã£ãŠããããšã説æããå¿ èŠããããŸãã ã¹ããŒã«ãŒãç¹ã«æ°ããåœãèŠãããã ãã«ãã·ã¢ãžã®é£è¡ã«ç¹ã«èå³ã®ãªãæåãªã¹ã¿ãŒã¹ããŒã«ãŒã説åŸããå¿ èŠããããŸãã ç¹ã«äž»ãªä»äºã§åããŠããå Žåãçµç¹ã®ä»äºã¯å€§å€ã§ãã ãããããããã®ãã°ããã人ã ãšã³ãã¥ãã±ãŒã·ã§ã³ããšãããšã§ããã¹ãŠãå ±ãããŸãã ããã«ãããããããç§ã¯èªåã§ãããããä»ã®äººã®äŒè°ã«åå ããããšæãããã«ãªããŸããã
IvanïŒã€ãŸããäŒè°ãããã®ã§ã¯ãªããäŒè°ã«åå ããããšããå§ãããŸãã
ã»ã«ã²ã€ïŒã¯ããäŒè°ã®éå¬ãé¿ããããšãã§ãããªãããã£ã³ã¹ãã€ããã¹ãã§ãã æŽçãããšããããªãã«ã¯å€§ããªè² æ ãããããŸããããã¯å¥ã®8æéã®ä»äºã®ãããªãã®ã§ãã å人çã«ã¯ãäŒè°ã®çŽ3ãæåã«ã1æ¥8æéè¿œå ã§åãå§ããŸããã ããã¯æ¥œããããšã§ã...ããããç§ã®å®¶æãåãããã楜ããããšãé¡ã£ãŠããŸãã ãåãåããããã ãããããšãããããŸãïŒ
ããã§ã¯ããããã¯ã«æ»ããŸãããã é¢æ°åããã°ã©ãã³ã°ã«ã€ããŠè©±ããŸããããããªãã®å ±åãç§ãçŽåŸããããšããæå³ã§ãããªãã¯ç§ãã»ãŒçŽåŸãããŸããã C ++ã®æ©èœçãªã¢ãããŒãã¯ãããŸããŸãªãã®ãåæããå¿ èŠããããšãã«ãã«ãã¹ã¬ããåã«åœ¹ç«ã€ãšçãããŠããŸãã æ¬åœã«åœ¹ç«ã€ã®ã§ããããïŒ
ã¢ã€ãŽã¡ã³ïŒãã¡ããã§ãã
ã¢ã¬ã¯ãµã³ããŒïŒ C ++ã§ã®æ©èœçãªãã«ãã¹ã¬ããã®äœ¿çšçµéšã¯éãããŠããŸãããçŽç²ãªé¢æ°ã®äžçãããå Žåããã«ãã¹ã¬ããç°å¢ã§ãããã«ã€ããŠè©±ãã®ã¯ã¯ããã«ç°¡åã§ãã ããšãã°ã競äºåã®ããããžãã¯ãäœæããå Žåãããããã¹ãŠãåæããããšããã¥ãŒããã¯ã¹ãã¯ãªãã£ã«ã«ã»ã¯ã·ã§ã³ãäœãã«ã€ããŠèããå¿ èŠã¯ãããŸããã ã³ãŒãã¯éåžžã®ã·ãŒã±ã³ã·ã£ã«ã³ãŒããšèŠãªããããã¹ãŠã®ãã«ãã¹ã¬ãããšåæã¯å éšã®ã©ããã«é ãããŠãããããããã¯ãã¹ãŠæ¶ããŸãã ãã«ãã¹ã¬ããããã°ã©ãã³ã°ãããã³é¢æ°åã«ã¯å€ãã®ã¢ãããŒãããããŸãã ããã絶察ã«ãã¹ãŠã®ã¢ãããŒãã§èµ·ãããã©ããã¯ããããŸããããããšãã°ããœãããŠã§ã¢ãã©ã³ã¶ã¯ã·ã§ã³ã¡ã¢ãªã¯ã競åããã¢ããªã±ãŒã·ã§ã³ã®è€éãã軜æžããããã®åªããã¢ãããŒãã§ãã æ®å¿µãªãããé©åãªåŠ¥åæ¡ãéžæããããšã§ãã
IvanïŒã³ã³ãã€ã©ãŒããã¹ãŠã®äœæ¥ãè¡ããšããå¹ççã«ãããæ¯æãå¿ èŠããããŸãã
ã¢ã¬ã¯ãµã³ããŒïŒãŸããããŸããŸãªåé¡ããããŸãã éå§ããã«ã¯ãSTMã®ãããªããããã¹ãŠã®ããšãç解ããŠããããã®ç§å¯ã®ç¥èãååã«äŒããå¿ èŠããããŸãã ãããŠãç¹å®ã®å®è£ ããã³å Žæã«ãšã©ãŒããããæåã®ã¹ã¬ããå¶åŸ¡ã䜿çšãããšãã¯ããã«ããŸãæ©èœããŸãã ãããããã®ãããªæåå¶åŸ¡ãããéãç°¡åã«æžãããšãã§ããŸãã å®è¡ã¯é ããªããŸãããã³ãŒãã®ãšã©ãŒã¯å°ãªããªããŸãã ãšããã§ãIvanããã®åé¡ãã«ã³ãã¡ã¬ã³ã¹ã§ã©ãã ãããŸãã«ããŒãããŠãããã«ã€ããŠã©ãæããŸããïŒ
ã¢ã€ãŽã¡ã³ïŒãã®ãããã¯ã¯æŽ»æ³ãåããŠããŸãã è¿å¹Žããã¹ãŠã®äž»èŠãªäŒè°-CPPConfãC ++ RussiaãMeeting C ++ãªã©ã -FPã代æ°çããŒã¿æ§é ããŸãã¯ãã®ãããªãã®ã®ããããã§çŽæ¥åä¿¡ããã¬ããŒãã æã«ã¯ãè¬æŒè ã¯ã圌ãã®ã¬ããŒãã§FPããã®æŠå¿µã«ã€ããŠè©±ããŠãããšã¯æããªãããšãããããŸãã C ++ã§ã¯ãç©äºã¯å€ãã®ç°ãªãå Žæããæ¥ãŸã...人ã ã¯éåžž1ã€ã®èšèªã ãã§æžãããšã¯ãããŸããã ã€ã©ã³ã»ã€ã¯ãããErlangãšC ++ã§æžããããããžã§ã¯ãã«åãçµãã§ãããšæ³åããŠãã ããã ãã®åŸãTatyana Petrovnaãå°çãã圌女ã¯ãã§ã«Haskellã§ããããªæ©èœã䜿ã£ãŠåããŠããã圌ãã¯ãæ°ã«å ¥ãã®ã¡ã«ããºã ãC ++ã«ç§»æ€ãããã®çµæãããŸããŸãªã³ãã¥ããã£ã®èšå€§ãªæ°ã®äººã ãC ++ã«ãŸããŸãå€ãã®ãã®ããããããŸãã ããã¯ãã¹ãŠç®ã®åã§èµ·ãããŸãã å°ãªããšããããã¯C ++éçºè ã³ãã¥ããã£ã§çºçããŸãããC ++äŒæ¥ã«é¢ããŠã¯ãç§ã«ã¯ããããããŸããã ãã ããC ++ã³ãã¥ããã£ã®å€ãã®äººã ãçŸåšãæ©èœæŠå¿µã«åãçµãã§ããŸãã
AlexanderïŒå€ãã®ãããC ++éçºè ãHaskellãç 究ããã®ã¯ãC ++ã§äœãèµ·ãã£ãŠããã®ããç解ããããã ãã§ãããšæ£ããç解ããŸãããïŒ
IvanïŒãã®çç±ã§åœŒããHaskellãæãããã©ããã¯ããããŸããã C ++éçºè ã¯ãšãŠãå©å·±çã ãšæããŸãã è€éã ãããšãã£ãŠãC ++ããšãŠãããåŠãã ã ãããŠãããªããæ¬åœã«æ°ããäœããåŠã³ããã®ã§ããã°ãããªãã®éã¯æããã«åçŽã§ããããã«ç¹å¥ã«äœæãããJavaã«ã¯ãããŸããã æãå¥åŠãªå¥åŠã§å¥åŠãªèšèªã®åéã調ã¹ãå¿ èŠããããHaskellã¯èªåçã«æã人æ°ã®ããçãã®1ã€ã«ãªããŸãã 人ã¯ãããèŠãŠç解ããŸãããããããã¯C ++ãããè€éãªãã®ã§ããããªãã¯åŠã¶å¿ èŠããããŸãã ç§ãHaskellãå匷ãããšããããã¯ç§ãšåãã§ããããããŠãç§ã¯ãŸã£ããåãæšè«ã®éçããã©ã£ãŠããå人ãããŸãã
ã¢ã¬ã¯ãµã³ããŒïŒãšãªãã¯ã»ããã©ãŒãã·ããªã¢ã§ç§ãã¡ãšäžç·ã«ããŠã圌ã®ã©ã€ãã©ãªãŒã®ç¯å²ã瀺ãããšãã圌ã¯ãã°ãã°ã€ã³ã¹ãã¬ãŒã·ã§ã³ã®æºã¯äœããšå°ããããŸããã 圌ã¯Haskellã ãšçããã è¡ã®ãã¹ãŠã®æ©èœã䜿çšããããšã¯ã§ããŸããããã³ãã¥ããã£ã«ã¯æããã«å¿ èŠãªæ©èœããããŸãã
ã¢ã€ãŽã¡ã³ïŒå°ãé²åããŠããŸãã éºäŒç©è³ªã ãŸããHaskellã¯C ++ããäœããååŸããããšã§ãæ¹åã§ããŸãã ã»ãšãã©ã®èšèªã¯ãã®ãããªé²åãéããŠããŸãã Javaã¯CïŒã®LINQãããèªäœã«é©åãããããšããCïŒã®LINQäœæè ã¯Haskellãªã©ããã€ã³ã¹ãã¬ãŒã·ã§ã³ãåŒãåºããŸããã ç°ãªãèšèªéã§çžäºã«åœ±é¿ãäžãããã®ãããªçŸãã絡ã¿åã£ããããã¯ãŒã¯ãå€æããŸããã
AlexanderïŒããããC ++ã¯ãŸã äœã¬ãã«èšèªã§ããïŒ
ã¢ã€ãŽã¡ã³ïŒã»ãšãã©ã®äººã¯ããæããŸãã
SergeyïŒã©ããªãäœã¬ãã«ãã«ã€ããŠè©±ããŠããã®ã§ããïŒ
IvanïŒäœã¬ãã«ã®ã³ãŒãã«ã³ã³ãã€ã«ãããŸããã ãã ããé«ã¬ãã«ã®æœè±¡åã§ã¯æ©èœããŸãã å šäœã®ãã€ã³ããšç®çã¯ããã®ãããªæœè±¡åãããã©ãŒãã³ã¹ã®é¢ã§äžå¿ èŠãªãªãŒããŒãããã«ã€ãªãããªãããšã§ãã C ++ã¯ãææžããããæªããªãæœè±¡ããã³ãŒããçæããå¿ èŠããããŸãã å°ãªããšãçè«çã«ã¯ã
ã¢ã¬ã¯ãµã³ããŒïŒèª°ãããã®èŠåãç Žã£ããã©ããªããŸããïŒ ããšãã°ãç¯å²ã
IvanïŒã³ã³ãã€ã«ã®ããã©ãŒãã³ã¹ãäœäžããŸã-ã¯ãã ãã¹ãŠã®æ°æ©èœãç¹ã«ã©ã€ãã©ãªã§æäŸãããæ©èœã«ãããã³ã³ãã€ã«æéãé·ããªããŸãã ããããç¯å²ãé ããªãçç±ã¯ãããŸããã ç¯å²ãé ããªã£ãŠããå Žåãããã§è²¬ããããšãã§ããã®ã¯ããã®ç¹å®ã®ã±ãŒã¹ã«æé©åãããŠããªãã³ã³ãã€ã©ã ãã§ãã
SergeyïŒç¯å²èªäœã¯ãã¬ãŒãããããŠããŸãããããããã°ã¢ãŒãã®ç¯å²-ããã¯è°è«å šäœã®æ¬è³ªã§ãã ãªãªãŒã¹ã¢ãŒãã§ã¯ãæ£åžžã«æ©èœããŸãã
ã¢ã€ãŽã¡ã³ïŒããã¯æ£åžžã§ãã
ã»ã«ã²ã€ïŒèª°ããããã«åæããããã§ã¯ãããŸãã:-)
ã¢ã€ãŽã¡ã³ïŒã¯ããå®éã«ç¥ã£ãŠããŸãã ããäŒç€Ÿã§ã¯ãæãé »ç¹ã«äœ¿çšãããã©ã€ãã©ãªã§...ã©ããªäŒç€Ÿãã©ã€ãã©ãªã§ãããã¯èšããŸãã...ãããã°ã¢ãŒãã§ã¯æŒžè¿çã«èããé ãã¢ã«ãŽãªãºã ããããŸãã ãããŠã誰ãç¯å²ãåãããšãããŠãããšäžå¹³ãèšãã§ããããïŒ
SergeyïŒä»è°è«ããŠããèšäºã§ã¯ããšãã»ã³ã¹ã¯ã©ãžã£èªäœã«ããã®ã§ã¯ãªããèè ã«ãšã£ãŠã®åãªãäŸã«ãããŸããã§ããã 察象åéã§ããã²ãŒã ãšã³ãžã³ã§ã¯ãããã¯åã«åãå ¥ããããŸããã
AlexanderïŒãããã®äººã ã¯ãSTLãå¿ èŠä»¥äžã«é ãåäœãããããSTLããŸã£ãã奜ãã§ã¯ãããŸããã ç¯å²ã¯ã©ã€ãã©ãªãåãæ¹åã«æ¡åŒµããã ãã§ãããç¯å²ã«ãšã£ãŠã¯äœ¿çšã§ããªãå¥ã®åœ¹ã«ç«ããªãæ©èœã®ããã«èŠããŸãã
ã»ã«ã²ã€ïŒå«ãã¯å«ãã ã
ã¢ã€ãŽã¡ã³ïŒãã®ãšããã§ãã ããšãã°ãå šå¡ã䞊ã¹æ¿ãã䜿çšããŸãã æšæºã©ã€ãã©ãªã«ã¯ãã以äžãœãŒãããªããšæ³åããŠãã ããã ã©ã®ããã«å®è£ ããŸããïŒ
SergeyïŒç§ã¯éåžžãã€ã³ã¿ãã¥ãŒã§ãã®ãããªè³ªåãããŸã:-)ããã¯éåžžã«ãããã質åã§ãã
IvanïŒã¯ãããããã質åã¯ãœãŒãã®å®è£ æ¹æ³ã§ãã 次ã«ãã¯ã€ãã¯ãœãŒãã®åºæ¬ããŒãžã§ã³ã«ã€ããŠèª¬æããŸããããã¯ãå®éã«ã¯äžçã®ä»ã®ã©ãã§ã䜿çšãããŠããŸããã æšæºã©ã€ãã©ãªã§ã¯ãN log Nãä¿èšŒãããŠããå¿ èŠããããé«éãœãŒããã§ããªããããæšæºã©ã€ãã©ãªã®äœ¿çšã¯èš±å¯ãããŠããŸããã ã»ãšãã©ã®å Žåãããã¯ã§ããŸããããã®å Žæã®æšæºã¯éåžžã«å³å¯ã§ããã环ç©N log Nãæå³ãããã®ã§ã¯ãªããçŽç²ãªN log Nã§ããå¿ èŠãããããã®ãããªã¢ã«ãŽãªãºã ãã©ã®ããã«å®è£ ããŸããïŒ libstdc ++ã§è¡ãããŠããããã«ããã°ãããœãŒãããããã®ããŸããŸãªæé©åã調æ»ããå°ãªããšã3ã€ã®ç°ãªãã¢ã«ãŽãªãºã ã§æ§æããã1ã€ã®ã¢ã«ãŽãªãºã ã«ããŒãžããå¿ èŠããããŸãã ããã¯æšæºã©ã€ãã©ãªã®æå³ã§ã-ããã°ã©ã ããããã«ããããã¹ãŠãç¥ãå¿ èŠã¯ãããŸããã æãå¹ççãªæ¹æ³ã§ãã¹ãŠãå®è£ ããæ¹æ³ãç解ããå¿ èŠã¯ãããŸãããä»ã®èª°ãããã§ã«ãããåŠçããŠãããŠããŸãã ãããã£ãŠããSTLã¯éåžžã«è€éã§ããSTLã䜿çšããã«ããã¹ãŠãæäœæ¥ã§æåããèšè¿°ããŠãã ããããšèšããšããç§ã¯ãã®ã¢ãããŒãã奜ãã§ã¯ãããŸããã
ã»ã«ã²ã€ïŒã€ã³ã¿ãã¥ãŒã®çµããã«è¿ã¥ããŠããã®ã§ãæåŸã®è³ªåïŒãã·ã¢ã§ã©ãã§ããïŒ
ã¢ã¬ã¯ãµã³ããŒïŒå¯ããªã£ãã
ã»ã«ã²ã€ïŒããªãã§ãïŒ ããªãã¯å°å ã§ãïŒ
ã¢ã€ãŽã¡ã³ïŒããããç§ã«ãšã£ãŠã¯äºæ³ä»¥äžã«æããã§ãã
ã»ã«ã²ã€ïŒ -16ã«ãªããŸããã-40ã«ãªããšãäŒãããŸããã
ã¢ã€ãŽã¡ã³ïŒã¯ããçŽæããŸããïŒ ç§ã¯ç¹ã«ãã€ãã¹40ã®æºåãããŸããã ãããŠã枩床èšãèŠããšããã¹ãŠãæãããªã£ãŠããŸãã
ã»ã«ã²ã€ïŒããŠãä»ã¯C ++ãã·ã¢2019ã§ã®ã¿äŒãäºå®ã§ããã¢ã¹ã¯ã¯ã§éå¬ãããäºå®ã§ãæ°æž©ã¯ãã©ã¹ã«ãªããŸãã ã€ã³ã¿ãã¥ãŒããããšãããããŸãããŸããäŒãããŸãããïŒ
åºåã®åã 4æ19ã20æ¥ã«ãC ++ãã·ã¢äŒè°ãéå¬ãããããã§Ivanãã移åã®ã¿ã®C ++ãã¶ã€ã³ããšãããã¬ãŒã³ããŒã·ã§ã³ãè¡ããã¢ã¬ã¯ãµã³ããŒãã¢ããããŒãµãŒã«ã€ããŠèª¬æããŸãã ããã«ãIvanã¯ãC ++ã§ã®é¢æ°åããã°ã©ãã³ã°ã®é©çšããšãã 3ã€ã®å€§ããªãã¬ãŒãã³ã°ã® 1ã€ãéå¬ããŸãã äŒè°ã®1ãæåããããã°ã©ã ã¯æ¹åããç¶ããŠããŸãã å ¬åŒãŠã§ããµã€ãã§ã¯ãã©ã®ã¬ããŒããæ¢ã«ããã°ã©ã ã«åå ããŠãã±ãããè³Œå ¥ããŠããããèŠãããšãã§ããŸãã ãã±ããã«ã¯ããŸããŸãªã¿ã€ãããããé©åãªãã±ãããéžæãããšãå€§å¹ ã«ç¯çŽã§ããããšã«æ³šæããŠãã ããã