Embed presentation
Downloaded 11 times









![Matz (2011) "discourage the use of autoload"
”
[...] autoload itself has fundamental flaw under
multi-thread environment. I should have remove
autoload when I added threads to the language.
[...] I hereby declare the future deprecation of
autoload. Ruby will keep autoload for a while,
since 2.0 should keep compatibility to 1.9.
But you don't expect it will survive further future,
e.g. 3.0.
I strongly discourage the use of autoload in any
standard libraries.
https://www.ruby-forum.com/topic/3036681
https://bugs.ruby-lang.org/issues/5653](https://image.slidesharecdn.com/rubyrequireautoloadload-140120053327-phpapp01/85/Ruby-s-require-autoload-and-load-methods-10-320.jpg)


The document discusses the deprecation of the 'autoload' feature in Ruby, as stated by Matz in 2011, citing its fundamental flaws in multi-threaded environments. While 'autoload' will remain in Ruby 2.0 for compatibility with 1.9, its future beyond that is uncertain, and Matz strongly discourages its use in standard libraries. The document also features insights from Peter Cooper about approaching the issue pragmatically.









![Matz (2011) "discourage the use of autoload"
”
[...] autoload itself has fundamental flaw under
multi-thread environment. I should have remove
autoload when I added threads to the language.
[...] I hereby declare the future deprecation of
autoload. Ruby will keep autoload for a while,
since 2.0 should keep compatibility to 1.9.
But you don't expect it will survive further future,
e.g. 3.0.
I strongly discourage the use of autoload in any
standard libraries.
https://www.ruby-forum.com/topic/3036681
https://bugs.ruby-lang.org/issues/5653](https://image.slidesharecdn.com/rubyrequireautoloadload-140120053327-phpapp01/85/Ruby-s-require-autoload-and-load-methods-10-320.jpg)
