Hi Chapel Users, As mentioned in the previous email, a PR has just been merged to the master branch that adds a compile-time warning for constructors.
Constructors can still be used in the 1.18 release, but we recommend updating your code to use initializers instead. As always, feel free to file issues on GitHub or join us on gitter if you encounter problems. - Ben Harshbarger On 7/23/18, 2:28 PM, "Ben Harshbarger" <[email protected]> wrote: Hi Chapel Users, As many of you know, we have been working on implementing the 'initializers' language feature with the eventual goal of replacing constructors. We are pleased to announce that starting today initializers will be enabled by default on master, and for the 1.18 release in Fall 2018. Quick summary of events: July 23rd - initializers enabled by default July 30th - deprecation warning for constructors Previously the compiler would generate a constructor for types that did not specify an initializer or a constructor: ```chpl class C { var x : int; } var c = new C(42); // calls constructor! ``` In the 1.18 release, the compiler will generate an initializer for type 'C' instead of a constructor. In most cases, users can invoke the generated initializer in the same way as the generated constructor. For those of you using constructors, and working off of master, fear not! Constructors can still be used in the 1.18 release, but will be accompanied by a deprecation warning at compile-time. This warning will be introduced to the master branch on July 30th. We recommend updating your code to use initializers, because constructors will eventually be removed entirely from the language. See the technote for more information on how to use initializers: https://chapel-lang.org/docs/technotes/initializers.html As always, feel free to file issues on GitHub or join us on gitter if you encounter problems. Thanks! -Ben Harshbarger ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Chapel-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/chapel-users ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Chapel-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/chapel-users
