Re: Why some function are class-less?

2016-11-17 Thread Jesse Phillips via Digitalmars-d-learn
On Thursday, 17 November 2016 at 18:40:12 UTC, Suliman wrote: For example I need to write all logs to file. I see this function, that seem set some global file name. "setLogFileSets a log file for disk file logging." But would it name accessible from anywhere or it would be visible

Re: Why some function are class-less?

2016-11-17 Thread Suliman via Digitalmars-d-learn
On Thursday, 17 November 2016 at 18:02:02 UTC, Jesse Phillips wrote: On Thursday, 17 November 2016 at 17:54:23 UTC, Suliman wrote: Ok, but when the logger class may be more helpful that function usage? You'd use the logger class when you need to make customizations or have multiple logging

Re: Why some function are class-less?

2016-11-17 Thread Jesse Phillips via Digitalmars-d-learn
On Thursday, 17 November 2016 at 17:54:23 UTC, Suliman wrote: Ok, but when the logger class may be more helpful that function usage? You'd use the logger class when you need to make customizations or have multiple logging schemes. I'd expect Vibe.d allows you to override the global logging

Re: Why some function are class-less?

2016-11-17 Thread Stefan Koch via Digitalmars-d-learn
On Thursday, 17 November 2016 at 17:54:23 UTC, Suliman wrote: On Thursday, 17 November 2016 at 17:45:31 UTC, Stefan Koch wrote: On Thursday, 17 November 2016 at 17:42:44 UTC, Suliman wrote: On Thursday, 17 November 2016 at 16:46:37 UTC, Steven Schveighoffer wrote: On 11/17/16 11:28 AM,

Re: Why some function are class-less?

2016-11-17 Thread Suliman via Digitalmars-d-learn
On Thursday, 17 November 2016 at 17:45:31 UTC, Stefan Koch wrote: On Thursday, 17 November 2016 at 17:42:44 UTC, Suliman wrote: On Thursday, 17 November 2016 at 16:46:37 UTC, Steven Schveighoffer wrote: On 11/17/16 11:28 AM, Suliman wrote: [...] D does not require classes to write

Re: Why some function are class-less?

2016-11-17 Thread Stefan Koch via Digitalmars-d-learn
On Thursday, 17 November 2016 at 17:42:44 UTC, Suliman wrote: On Thursday, 17 November 2016 at 16:46:37 UTC, Steven Schveighoffer wrote: On 11/17/16 11:28 AM, Suliman wrote: [...] D does not require classes to write functions. All a class member function is anyway is a function with an

Re: Why some function are class-less?

2016-11-17 Thread Suliman via Digitalmars-d-learn
On Thursday, 17 November 2016 at 16:46:37 UTC, Steven Schveighoffer wrote: On 11/17/16 11:28 AM, Suliman wrote: There is some functions that can be called without creation of class. For example: http://vibed.org/api/vibe.core.log/ As I understand I can create write log in two way. First

Re: Why some function are class-less?

2016-11-17 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/17/16 11:28 AM, Suliman wrote: There is some functions that can be called without creation of class. For example: http://vibed.org/api/vibe.core.log/ As I understand I can create write log in two way. First create instance of Logger, second simply call function. Why it's done so? Just as