Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Services - singletons reinvented

24 views
Skip to first unread message

Mr Flibble

unread,
Nov 1, 2020, 3:26:00 PM11/1/20
to
Just made my new C++ logging framework a service:

service<debug::logger>() << "foo" << endl;

A service is superior to a standard singleton as you can share the service between the app and any plugins the app loads.

/Flibble

--
¬

Leo

unread,
Nov 1, 2020, 3:37:23 PM11/1/20
to
Is that resolved on compile-time and optimized/inlined or is there a
runtime cost for this?

Mr Flibble

unread,
Nov 1, 2020, 4:00:14 PM11/1/20
to

Brian Wood

unread,
Nov 1, 2020, 5:56:14 PM11/1/20
to
As you know I'm a proponent of property rights and
services are part of that story. Any one who has ever
had a car/house etc. may also be for property rights.


Brian
Ebenezer Enterprises
https://github.com/Ebenezer-group/onwards

Mr Flibble

unread,
Nov 1, 2020, 5:57:38 PM11/1/20
to
What the fuck are you talking about? Fuck off you mentalist.

/Flibble

--
¬
0 new messages