java - What is the history of the import statement? -


i know of 2 languages use import statement: java , python. , know the import antigravity joke.

which language introduced statement? 1 of two, or 1 altogether? when?

import 1 way specify dependency on other class/module. way of specifying has been present in many, many languages.

in fact import in java , import in python 2 entirely different things:

  • in java import provides ability refer type (or field/method, if using import static) short name instead of qualified name. no "module loading" of kind happens based on import.
  • in python import loads module , optionally provides short name (or all) of members.

other keywords similar things include in c , use in perl. many, many languages have kind of way specify kind of dependency, technical details vary lot.

one language import statement predates both java , python modula-2 (1978) , successor modula-3.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -