ãã®è¨äºã¯Scala Advent Calendar 2022ã®19æ¥ç®ã§ã. Scalaã§ã¯ã¸ã§ããªãã¯åã®å¤æ§(variance)ã¯+ã-ã§æå®ãã¾ãã, ä»ã®è¨èª(ãã¨ãã°, C#, Kotlin)ã§ã¯outãinã ã£ãããã¾ã. ãã®è¨äºã§ã¯å¤æ§ã®æå³ãæ´çãã¦, ãªãScalaã§ã¯+/-ã®è¨å·ã使ãã®ã説æãã¾ã. 追è¨ãã ã, ããã§èª¬æãã¦ããå 容ã¯åºæ¬çã«C#ãKotlinã§ãæç«ãã(ã¯ããª)ã®ã§ããªããããã®è¨èªã§ã¯+/-ã®è¨å·ã使ããªãã®ããã説æãããã®ã§ã¯ããã¾ãã. å人çã«ã¯+/-ã®æ¹ãããããããã¨æãã, out/inã®è¨æ³ã¯æ±ã£ã¦ããæ¦å¿µãç°¡åã§ãããã®ãããªèª¤è§£ãçã(æªãè¨ãã°é¨ã)ã®ã§ã©ã¡ããã¨è¨ãã¨å«ãã§ã. çºç«¯ ãããã話é¡ãããã¾ãã. Scala ã¯å ±å¤ã + ã§ãåå¤ã - ãªã®ã§çè«éè¦ï¼ ãªã®ã«å¯¾ãã¦ãKotlin 㨠TypeSc
{{#tags}}- {{label}}
{{/tags}}