API naming consistency

Why it is so difficult for Apple dev team to maintain consistent naming of their APIs?

  • The function is called fatalError(_:file:line:)
  • The corresponding Loogger.Level is called critical. Why not fatal?

Is Ali Ozer still working at Apple to kick the a*s of new developers?

I do not assume that either the function or the log level will be renamed. But I hope someone will take care of details (in the future).

P.S. I am developing on NeXTStep since 1990. There were times when APIs were so consistent, one could guess them almost 100% correctly. It will benefit the community if this would be true today as well.

Answered by DTS Engineer in 792849022
Why not fatal?

Because it’s not the same thing. The fatal in fatalError(…) is pretty definitive: That routine does not return.

OTOH, the critical logging APIs don’t share that characteristic. Consider this:

Logger().critical("Something bad happened")
Logger().critical("Something else bad happened")

You will see both log entries.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

You should file a bug report. It may ring a bell. Who knows.

Why not fatal?

Because it’s not the same thing. The fatal in fatalError(…) is pretty definitive: That routine does not return.

OTOH, the critical logging APIs don’t share that characteristic. Consider this:

Logger().critical("Something bad happened")
Logger().critical("Something else bad happened")

You will see both log entries.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

API naming consistency
 
 
Q