简体   繁体   中英

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?

Thanks in advance.

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.lang package 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 ).

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 .

  1. 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 as Apache Common Lang.

Hope this helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM