scala3
Scala 3.6.2ãåºãï¼ãã£ãã¼ï¼ github.com Scala 3.6.2ã¯ãScala 3.6ç³»ã®æåã®æ£å¼ãªãªãªã¼ã¹ã§ãæ°å¤ãã®æ©è½ã追å ãããããã®è¨äºã§ã¯ãã®ãã¡ä¸»è¦ãªæ©è½ãç´¹ä»ãããã¾ããæ£ç¢ºããããåããããããåªå ãã¦ã¶ãã¯ãªæ¸ãã¦ããã¨ãããããã®ã§ããâ¦
çªç¶ã ããã®Scala 3ã®ã³ã¼ãã¯ã³ã³ãã¤ã«ããã ããããå ã«æ£è§£ãè¨ã£ã¦ããã¨ãã³ã³ãã¤ã«ããã(Scala 3.5.0)ã class Foo: val x = y val y = 42 ã§ã¯ããã®Fooã«åãã¦ä»¥ä¸ã®å¼ã³åºããè¡ãã¨ã©ããªãã ããï¼ Foo().x é©ããªããããã®å¼ã¯0ã«è©ä¾¡ãâ¦
Scala 3ã«ã¯summonã¨ããé¢æ°ããããæ®æ®µã¯ãã¾ã使ããã¨ããªãããç¥ã£ã¦ããã¨usingã¾ããã®ãããã°ã«ã使ããã¨ã¦ã便å©ãªãã¤ã ããã®è¨äºã§ã¯summonã®ä¾¿å©ãªå©ç¨æ³ãç´¹ä»ããã docs.scala-lang.org åã®ä¸è´ã確èªãã summonã®å ¸åçãªã¦ã¼ã¹ã±ã¼â¦
Tagged Type ã¨ãããã¯ããã¯ãããï¼TypeScriptçéãªã©ã§ã¯Branded Typeã¨å¼ã°ãã¦ããããã ï¼ãå®è¡æã®åã¨ãã¦ã¯åãã ããåã·ã¹ãã ä¸ã¯ãããåºå¥ãã¦å¥ç©ã¨ãã¦æ±ããæ··åã§ããªãããä»çµã¿ãä½ãããã®ãã®ã ã AIããï¼ãµã ãã¤ã©ã¹ãä½ã£ã¦ï¼â¦
æªä½¿ç¨ã®importãå¤ãæ¤æ»ããã³ã³ãã¤ã©ãªãã·ã§ã³ã¨MetalsãScalafixã¨ã®é¢ä¿ã«ã¤ãã¦èª¿ã¹ãã¡ã¢ã§ããã³ã³ãã¤ã©ã¾ããã®å®è£ ã追ãããã¦ããªãå¯è½æ§ããããããééã£ã¦ããããææããã ããã¨å¬ããã§ãã ãã¤ã¦Scala 2ç³»ã§ã¯unused importãªã©ã®â¦
å æ¥ï¼ã¨ãã£ã¦ãçµæ§åã®ãã¨ã ãï¼ãScala 3ã®LTSãµãã¼ããã¼ã¸ã§ã³ã§ãã3.3.0ããªãªã¼ã¹ããããScala 3ã®éçºãåçãã¦ãã¦ããããã§å¬ããããããããå æ°ã§ãã¦ããä»åã¯Scala 3ãAWS Lambdaã®Container imageã使ã£ã¦åä½ãããææ³ã«ã¤ãã¦ãâ¦
Scalaããã¤ãã£ãã³ã³ãã¤ã«ãã¦JVMç¡ãã§å®è¡ãã¡ã¤ã«ã¨ãã¦åãããããã«ããä»çµã¿ã§ããScala Nativeãããã¤ã®ã¾ã«ãã·ã³ã°ã«ãã¤ããªãåºåã§ããããã«ãªã£ã¦ãããããã«ãããGoã¨åãããã«1ã¤ã®ãã¤ããªããã³ãã¼ããã°Scalaãåãããç°å¢ãâ¦
Scala 3ã«ã¯å¤§ããªæ§æä¸ã®å¤æ´ãä¾ãã°implicitã¾ãããæ´çããã¦givenãªã©ã«å¤åããããã¦ããä¸æ¹ã§ãç´°ãããªæ©å¾®ã«ãããå¤æ´ãå«ã¾ãã¦ãããä»å説æããimportæ§æä¸ã®ã¯ã¤ã«ãã«ã¼ãè¨å·ã®å¤æ´ããã®ä¸é¨ã Scala 2ã§ã¯ãããããã±ã¼ã¸ã«å±ããâ¦
å æ¥ãScala CLI v1.0.0ãã¤ãã«ãªãªã¼ã¹ããããããã¾ã§ã¯v0ç³»åã ã£ãã®ã§ãæºãæãã¦ã®æ£å¼çãªãªã¼ã¹ã ãããã§ã¨ãï¼ github.com ãã¡ãã説æãã¦ããã¨Scala CLIã¯ç·åçãªScalaã®ã³ãã³ãã©ã¤ã³ãã¼ã«ã§ã以ä¸ã®ãããªãã¨ãã§ãã: Uber JAR(åä½â¦
ããããã°ScalaãAWS Lambdaã§å®è¡ããã®ã©ããããã ã£ããã¨æã£ããå®ã¯ScalaãLambdaã§åããããã¨ã¯ç¡ãæ°ãããã®ã§èª¿ã¹ã¦ããããä»åã¯Java 17ãåæã«åä½ãããã tl;dr AWS Lambdaã®Javaã©ã³ã¿ã¤ã sbt-assembly sbt-assemblyã¸ã®ä¾åæ§ã®å®£è¨ â¦
Scala3ãã£ã¬ã³ã¸ãããè¨äºã®äºæ¬ç®ã ååã¯ãã¡ãã blog.3qe.us ã½ã¼ã¹ã³ã¼ãã¯ä»¥ä¸ã«ç½®ãã¦ããã github.com github.com Union Types Eitherã¨ã®éã Discriminated Union Typesãã©ã Intersection Types ã¾ã¨ã MathJax v3以éã§ã¯bussproofs.styãâ¦
ã¡ã³ã¡ã³Scala3ã«çããæ°æ©è½ã®å®éã«ä½¿ã£ã¦ã¿ããã£ã¬ã³ã¸ããã£ã¦ããããã¤ã®æ¥ããã¼ã ã«å°å ¥ã§ãããå¬ããããã¨ããèªåã§ä½¿ãããªããããã«ãªãã¨å¬ããããã¨ããã¢ããã¼ã·ã§ã³ã§ããã ä»æ¥ã¯Optional Bracesã«ã¤ãã¦åå¼·ãããã½ã¼ã¹ã³ã¼ãã¯â¦