On Monday, 29 May 2017 at 23:39:17 UTC, Russel Winder wrote:
C++ allows one to create types that are pointer types but wrap
a primitive pointer to give RAII handling of resources. For
example:
class Dvb::FrontendParameters_Ptr {
private:
dvb_v5_fe_parms * ptr;
public:
On Monday, 29 May 2017 at 23:39:17 UTC, Russel Winder wrote:
C++ allows one to create types that are pointer types but wrap
a primitive pointer to give RAII handling of resources. For
example:
class Dvb::FrontendParameters_Ptr {
private:
dvb_v5_fe_parms * ptr;
public:
On Monday, 29 May 2017 at 23:39:17 UTC, Russel Winder wrote:
C++ allows one to create types that are pointer types but wrap
a primitive pointer to give RAII handling of resources. For
example:
[...]
std.stdio.File does basically the same thing with C's FILE*
C++ allows one to create types that are pointer types but wrap a
primitive pointer to give RAII handling of resources. For example:
class Dvb::FrontendParameters_Ptr {
private:
dvb_v5_fe_parms * ptr;
public:
FrontendParameters_Ptr(FrontendId const & fei, unsign
@rootPathFromName
interface API
{
@path("mytrack") @method(HTTPMethod.GET)Json
doTrackSpeedAnalyze(int trackid, string startDateTime, string
endDateTime);
}
class MyRouter : API
{
Config config;
Database database;
this(Config config, Database database)
{
this.
On Monday, 29 May 2017 at 08:49:07 UTC, ketmar wrote:
Brad Roberts wrote:
libraries that themselves aren't marked pure, there's a real
need for escape hatches. A simple example: anything that has
a malloc/free pair.
they aren't pure. it is a sad misconception about purity, which
D makes ev
I wrote next code:
void foo(string _error = null)
{
writeln("Error");
}
override:
@errorDisplay!foo
Json doTrackSpeedAnalyze(int trackid, string
startDateTime, string endDateTime) //
/api/mytrack?trackid=123&startDateTime=2000&endDateTime=
On Monday, 29 May 2017 at 12:23:59 UTC, Suliman wrote:
I am doing REST interface with vibed. And thinking about
handling errors, if users forgot to pass all expected args in
function.
For example:
foo(int x, int y) // get request
{
}
/api/foo?x=111
And if user is forgot to pass `y` we will
On Monday, 29 May 2017 at 12:23:59 UTC, Suliman wrote:
I am doing REST interface with vibed. And thinking about
handling errors, if users forgot to pass all expected args in
function.
For example:
foo(int x, int y) // get request
{
}
/api/foo?x=111
And if user is forgot to pass `y` we will
I am doing REST interface with vibed. And thinking about handling
errors, if users forgot to pass all expected args in function.
For example:
foo(int x, int y) // get request
{
}
/api/foo?x=111
And if user is forgot to pass `y` we will get error in the
browser. What is the right way to handl
On Monday, 29 May 2017 at 11:25:06 UTC, ketmar wrote:
almost all of them, 'cause they depends on FPU rounding
settings.
Well, yeah. IIRC contemporary floating point machine language
instructions allow embedding of rounding mode into the
instruction.
A pity languages are lagging behind, stuc
Ola Fosheim Grøstad wrote:
On Monday, 29 May 2017 at 08:49:07 UTC, ketmar wrote:
pure. and while various functions in std.math, for example, are marked
`pure`, they aren't too.
Out of curiosity, which functions in std.math aren't "pure" in the D
sense?
almost all of them, 'cause they depen
On Monday, 29 May 2017 at 08:49:07 UTC, ketmar wrote:
pure. and while various functions in std.math, for example, are
marked `pure`, they aren't too.
Out of curiosity, which functions in std.math aren't "pure" in
the D sense?
Brad Roberts wrote:
libraries that themselves aren't marked pure, there's a real need for
escape hatches. A simple example: anything that has a malloc/free pair.
they aren't pure. it is a sad misconception about purity, which D makes
even more complex by allowing to mark, for example, *sette
27.05.2017 02:44, Nicholas Wilson пишет:
Thats weird. DMD may have got the mangling wrong. Could you post the
exact mangling (i.e. non-demangled)? And if DMD has got it wrong and its
just the one function you could just `pragma(mangle, ...);` it.
I use pragma(mangle, "...") (how I forget about i
15 matches
Mail list logo