Project

General

Profile

Actions

Feature #5653

closed

"I strongly discourage the use of autoload in any standard libraries" (Re: autoload will be dead)

Added by matz (Yukihiro Matsumoto) almost 10 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Target version:
[ruby-core:41149]

Description

Hi,

Today, I talked with NaHi about enhancing const_missing to enable
autoload-like feature with nested modules. But autoload itself has
fundamental flaw under multi-thread environment. I should have remove
autoload when I added threads to the language (threads came a few
months after autoload).

So 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.

matz.


Files

noname (500 Bytes) noname Anonymous, 11/22/2011 04:53 AM
5653.pdf (38.3 KB) 5653.pdf nahi (Hiroshi Nakamura), 07/01/2012 12:24 AM

Related issues

Related to Ruby master - Bug #11277: "code converter not found" error with multi-thread (high occurrence rate since r50887)ClosedActions
Related to Ruby master - Feature #7835: autoload will be deadRejected02/12/2013Actions
Related to Ruby master - Feature #15592: mode where "autoload" behaves like an immediate "require"OpenActions
Actions

Also available in: Atom PDF