ãªãã©ã«ã¬ãã«ããã°ã©ãã³ã°ã¨ããç¨èªãåå¨ããã®ãã¯ç¥ãã¾ããããã¹ã¤ã«å³å¯ã«å®ç¾©ãããªãã¨ãªã使ãã¾ããã¾ããã https://github.com/okomok/lity ã®èª¬æã "Exploring literal-level metaprogramming" ãªã®ã§ãããããæåã¨ããæãã§ãããã ãã¦ãscalaã§ã¯ãStringãIntã®ãªãã©ã«ã§final valã§å®ç¾©ããã¨ãåèªä½ãç¹å¥æ±ãããã(?)ã¨ãããç¥ããããä»æ§ãããã¾ããã¾ãã¯ä»¥ä¸ã®gist御覧ãã ãã finalãä»ããã« val a = "a" ã ã¨å㯠a: String = a ãªã®ã«å¯¾ãã¦ãfinal valã«ãã㨠b: String("b") = b ã¨ããããããããªãåã«ãªã£ã¦ã¾ããããã㦠def foo(c: b.type) ã¨å®ç¾©ããã¨ãfoo("bar")ã¨æ¸¡ãã¨ã³ã³ãã¤ã«ã¨
{{#tags}}- {{label}}
{{/tags}}