huntlabs / hunt

A refined core library for D programming language. The module has concurrency / collections / event / io / logging / text / serialization and more.
Apache License 2.0
95 stars 15 forks source link

Make logging @trusted/@safe/pure (?) #78

Open Cogitri opened 4 years ago

Heromyth commented 4 years ago

These attributes are not always useful. They bring more troubles than gains before they are implemented by D compiler. The @nogc may be useful. In fact, we have implemented a simple logger which supports betterC. It is included in another project which has not be published.

Cogitri commented 4 years ago

These attributes are not always useful. They bring more troubles than gains before they are implemented by D compiler.

Hm, but others (including me) might find them useful to isolate bugs and not being able to call the log functions in them is unfortunate

Heromyth commented 4 years ago

It's better for the underlying APIs to be marked as @trusted/@safe/pure if they are tested well. As for the logger's APIs, we have no any reason to refuse a pull request.