Crystal: Rename File::DEVNULL to File::NULL

Created on 13 May 2019  路  2Comments  路  Source: crystal-lang/crystal

The current name of File::DEVNULL is really Windows unfriendly. I think now that Windows support is somewhat close, the standard library should become more platform-unspecific with the terms used.
I propose to simply rename it to File::NULL just like in Ruby. It's shorter, simple and also nicer for people who switch from Ruby to Crystal.

All 2 comments

Or something like File::VOID, to emphasize even more the fact that the data will be sent to a black hole.
The pros of File::NULL is its known for those coming from Ruby, and familiar for those from UNI*X.

I went with File::NULL because UNIX's file null has "null" in it and Windows's file null is named after the word, just one "l" is missing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pbrusco picture pbrusco  路  3Comments

Sija picture Sija  路  3Comments

relonger picture relonger  路  3Comments

cjgajard picture cjgajard  路  3Comments

oprypin picture oprypin  路  3Comments