Chuan Liang
Chuan Liang

Reputation: 9

Why apache commons lang is "lang", does lang stand for language?

I use apache commons lang lib as my favorite 3rd party lib for many years, but I don't really understand what's the meaning of "lang" in its name. Yesterday I thought I need another try. I tried googling for some time and read through all its official website , got still no luck. Does anyone knows the answer to my question here?

Upvotes: -1

Views: 1061

Answers (3)

Ramya
Ramya

Reputation: 41

  1. Apache Commons Lang is a set of utility functions and reusable components that should be of use in any Java environment. This library provides helper functions for java.lang.

  2. Package java.lang Provides classes that are fundamental to the design of the Java programming language.

Thus, referred to as Apache Common Lang.

Upvotes: 0

itwasntme
itwasntme

Reputation: 1462

The content of official webiste you've enclosed says that, this library provides a host of helper utilities for the java.lang API.

The java.langpackage contains of fundamental classes of Java and its design and since the commons-lang is mainly designed to add additional utility and helper classes for the classes in java.lang package, the -lang postfix of this Apache library seems to be self descriptive.

In addition, the lang is mostly the shorthand for language word.

Edit:
I understand a little the origin of your question, but I think, having such dilemmas is unnecessary. Having such objections could lead to "why Java is named Java" (no mention of cross-platform, OOP and others in the name), "why Lombok...", "why Gradle...", Hibernate, Spring, H2, Redis... (you should get the point).

The 3rd party library can be named in any way as its developers wishes, the lib name is used mostly just as dependency and the more important thing is that the library should have a kind of self descriptive class names (like NumberUtils or StringUtils).

Upvotes: 2

Andreas
Andreas

Reputation: 159225

The main Apache Commons page says:

Lang: Provides extra functionality for classes in java.lang.

The link you provided to the Apache Commons Lang page says:

Lang provides a host of helper utilities for the java.lang API, notably String manipulation methods, basic numerical methods, object reflection, concurrency, creation and serialization and System properties. Additionally it contains basic enhancements to java.util.Date and a series of utilities dedicated to help with building methods, such as hashCode, toString and equals.

So, to answer your question "what's the meaning of "lang" in its name?", the answer is:
"Lang" refers to the core java package java.lang.


For reference, the javadoc of package java.lang says:

Provides classes that are fundamental to the design of the Java programming language.

Upvotes: 2

Related Questions