2022-10-01ãã1ã¶æéã®è¨äºä¸è¦§
åè«ãåçè«ï¼åä»ãã©ã ãè¨ç®å«ãï¼ãè«çã¯ãã«ãªã¼ï¼ãã¯ã¼ãï¼ã©ã³ããã¯å¯¾å¿ã«ãããå種ã®æ§é ï¼ä¾ãã°ãã«ã«ãéåï¼ãæ±ã£ã¦ããã¨ç解ãããã¨ãåºæ¥ã¾ããããããç¨èªæ³ã»è¨æ³ã¯ãã©ãã©ã§ãããã®ãã©ãã©ãããã«ã対å¿é¢ä¿ãæããããªãã£â¦
å ¨ç§°åï¼åå¨åã®ãã¨ã調ã¹ã¦ãã¦ï¼ãå ¨ç§°åï¼ åå¨åï¼ â¥â¥ï¼ï¼ãåç §ï¼ãæ°ã«ãªã£ããã¨ãããã¾ãããsomeï¼è«çè¨å· âï¼ã¨ anyï¼è«çè¨å· âï¼ãã»ã¼åãæå³ã§ä½¿ããã¦ããããç¨æ³ãé転ãã¦ããããèµ·ãã¦ãã¦ãããã¯ä½ã§ã ããï¼ ã¨çåãæãã¾ããâ¦
æ¨æ¥ãã¾ã¨ãããããã®ã§ããã®è©±é¡ãä¸æ®µè½ã§ãããåãè¨ããããã¨ã¯ï¼ ãå ¨ç§°ï¼åå¨ãã¨ããè¨èããâï¼âãã¨ããè¨å·ããåçè«ã®ãªãã§ä½¿ãã®ã¯ãããã»ããããããã£ã¦ãã¨ã§ããä½ãå¾ãããã¨ããªãã¦ãå¼å®³ãããã¾ãããå ¨ç§°ï¼åå¨ããâï¼âããâ¦
æ¨æ¥ã»ä»æ¥ã¨ããå ¨ç§°åï¼åå¨åã§å°æãããã¨ãã話ãæ¸ãã¾ããã å ¨ç§°åï¼ åå¨åï¼ â¥â¥ï¼ï¼ ã¢ããããï¼ã¡ãããªãç¬ãï¼ï¼ å ¨ç§°åï¼åå¨å å ¨ç§°åï¼åå¨å è£éº ãªãã¨ãªãæ å¢ã¯è¦ãã¦ããã®ã§ããã£ããã¾ã¨ãããã¦ããã¾ããããã¨ãåå¨åã®ä¸é¨â¦
ãã¢ããããï¼ã¡ãããªãç¬ãï¼ï¼ å ¨ç§°åï¼åå¨åãã§è§¦ãã Swift ã® existential any ã ãã©ï¼ some ã¨ãããã¼ã¯ã¼ãã¯æ¢ã«ä½¿ããã¦ãã¦ãany ã«ãããããªãã£ããã¨ããäºæ ã¿ããã§ããSwift ã§ã¯ããã¼ã¯ã¼ããä»ããä»ããªãã«é¢ãããããããã³ã«â¦
ãå ¨ç§°åï¼ åå¨åï¼ â¥â¥ï¼ï¼ããæ¸ãçµãã£ãå¾ã§è¦ã¤ãããSwift ã®åå¨åã«é¢ããè¨äºãï¼ Existential any in Swift explained with code examples Existential any allows you to define existential types in Swift by prefixing a type with the any kâ¦
ãå¤ç¸é¢æ°ã表ãå ¨ç§°è¨å·ããããã«éãã¯ã±ãã«ããã¦ãå¤ç¸é¢æ°ãä¾ååã表ãã¨ãã«ä½¿ãå ¨ç§°è¨å·ã話é¡ã«ãã¾ãããåã¯å ¨ç§°è¨å·å対派ã§ãããå®éã«ã¯å ¨ç§°è¨å·ã使ããã¦ãã¾ãããã¦ã¨ããã§ããå ¨ç§°ééãããåãuniversally-quantified typeãããâ¦
ãã°ãªããè¨ç®ã¨ã³ã¼ããªã³ã°ãããã¦äºéåãã«ããã¦ãäºéåã®2-å°ãæããã¼ã¹ãã£ã³ã°å³ã¨ã¹ããªã³ã°å³ãç´¹ä»ãã¾ãããã¹ããªã³ã°å³ã§ã¯ã縦æ¹åã¯ã¤ã¤ã¼ã¯ä¸ããä¸ã横æ¹åã¯ã¤ã¤ã¼ã¯å·¦ããå³ã§ã常èçãªæ¸åæ¹åã«ä¸è´ãã¦ãã¦ããã¼ãæ°æã¡ããâ¦
éå»è¨äºãããªã¼ã¢ãã 1ï¼ èªç±ã§ç¡æãªæ¨ãã«ããã¦ãããªã¼ã¢ããã®èª¬æããã¾ããããã®éå»è¨äºã®åé ã¯æ¬¡ã®ããã§ããï¼ èª¬æã«ã¯ãå¤ãã®å ´åãHaskellã³ã¼ãã¾ãã¯Haskell風æ¬ä¼¼ã³ã¼ãã使ããã¦ãã¾ããããã°ã©ãã³ã°è¨èªã¨ãã¦ã®Haskellã®å©ä¾¿æ§â¦
ãã¬ãªãã¸ã¼åãã³ã³ãã¯ãéåããã¬ã¼ã¹ä»ãã¢ãã¤ãåãªã©ã®ããã ã®è¦ªæçé¢é£æ§ã調ã¹ãããã¨ããåæ©ããè³æãæ¢ãã¦ãããã¡ã«ãäºéåã使ãææ³ã«åºä¼ãã¾ããããã®ãã¨ãåã®è¨äºã«æ¸ãã¾ããã ã°ãªããè¨ç®ã¨ã³ã¼ããªã³ã°ãããã¦äºéå ã¢â¦
ããæè¿ããã¬ãªãã¸ã¼åãã³ã³ãã¯ãéåããã¬ã¼ã¹ä»ãã¢ãã¤ãåãªã©ã®ããã ã®è¦ªæçé¢é£æ§ã«èå³ãæã£ã¦ãã¾ãããªããè³æããªãããªãã¨æ¢ãã¦ããã次ã®è«æãè¦ã¤ãã¾ããã Title: Cornering Optics Authors: Guillaume Boisseau, Chad Nester, â¦
ã両å´ãã¬ãªãã¸ã¼åã¨ãã¬ãªã¼ãããã³ãã«ã¦ï¼ 両å´ãã¬ãªãã¸ã¼åã¯èªå·±å対ã³ã³ãã¯ãéåã¨ããä¼¼ãæ§é ã«ãªãã¾ãããã¬ãªãã¸ã¼åã¨ã³ã³ãã¯ãéåã«ã¯ã親æçé¢é£æ§ãããã®ã§ãããã ãã¬ãªãã¸ã¼åãã³ã³ãã¯ãéåããã¬ã¼ã¹ä»ãã¢ãã¤ãåã®â¦
ããã¬ãªãã¸ã¼åã®å ¬çã®èªç¶ãªè§£éãã«ã¦ï¼ [ãã¬ãªãã¸ã¼åã«é¢ãã] ãã®ãããªäºå®ããã¹ãããªã¨çãæ¸ãè¨è¿°æ¹æ³ã¯ãªããã®ã§ããããï¼ ããã³ãMario Romanãã®ã¹ããªã³ã°å³ã¯ç¢ºãã«ä¾¿å©ã§ããã大è¦æ¨¡é«æ¬¡ãªä»£æ°ç³»ãç´æ¥çã«è¡¨ç¾ããè¨æ³ã»æç»æ³â¦
ä»æ¥ã¯ä¸é£ä¼ã®çãä¸ã®æ¥ãªã®ãããããªæ¥ã«åã¯ãçå±ã£ã½ããã©ææ çãªè¨äºãæ稿ãã¾ããå¤ç¸åï¼å¤ç¸é¢æ°ã®è¡¨ç¾ã«ä½¿ãããå ¨ç§°è¨å·ãåã¯ãã£ã¨å«ã£ã¦ãã¾ãããã®çç±ã説æãã¾ããçå±ã£ã½ã話ã«èå³ããªããªããæå¾ã®ç¯ã ãã§ããããã«éãã¯ã±â¦
æ¨æ¥ã®è¨äºããã¬ãªãã¸ã¼åã®å ¬çã®èªç¶ãªè§£éãã«ã¦ï¼ [ãã¬ãªãã¸ã¼åã«é¢ãã] ãã®ãããªäºå®ããã¹ãããªã¨çãæ¸ãè¨è¿°æ¹æ³ã¯ãªããã®ã§ããããï¼ ããã³ãMario Romanãã®ã¹ããªã³ã°å³ã¯ç¢ºãã«ä¾¿å©ã§ããã大è¦æ¨¡é«æ¬¡ãªä»£æ°ç³»ãç´æ¥çã«è¡¨ç¾ããè¨â¦
æ¨æ¥ããã¬ãªãã¸ã¼åãæ¡å¼µãã話ããã¾ãããæ¡å¼µããâ両å´ãã¬ãªãã¸ã¼åâã¨ããæ¦å¿µã«ãã©ã®ç¨åº¦ã®æ義ããããããããªã¨ã¯ããããªãã®ã§ããããã¨ã«ãããã¬ãªãã¸ã¼åã¨ããæ¦å¿µã¯ããã£ããå®å®ãããã®ã ããã¨æãã¾ããããæãçç±ã¯ããã¬ãªâ¦
ç¶æ é·ç§»ç³»ããªã¼ãããã³ãã¬ã³ãºã§è¨è¿°ãããã¨ããã¨ãã©ããâçãâã¨ãããããã¾ãããã¬ãªãã¸ã¼åã«ãå対çãªåèªå復å°ã追å ããåãæ§æããã¨ãç¶æ é·ç§»ç³»ï¼ãªã¼ãããã³ã®è¨è¿°ã«ã¯é½åãè¯ãããã§ããæãä»ããã ãã§ããã¾ã確èªã»åå³ã¯ãâ¦