On Sunday, 3 November 2019 at 13:35:36 UTC, Martin Nowak wrote:
Glad to announce D 2.089.0, ♥ to the 44 contributors.
This release comes with corrected extern(C) mangling in mixin
templates, atomicFetchAdd and atomicFetchSub in core.atomic,
support for link driver arguments, better support of
On Sunday, 20 October 2019 at 21:45:35 UTC, Robert M. Münch wrote:
class myWidget : Observer!message {...}
class FilterSubject : SubjectObject!message {
Disposable subscribe(myWidget observer){...}
}
I tried to add "alias subscribe = SubjectObject.subscribe;" in
different places, but that
On Monday, 14 October 2019 at 19:45:11 UTC, Paul Backus wrote:
On Monday, 14 October 2019 at 17:00:56 UTC, John Colvin wrote:
Different ability to access a property depending if I'm inside
something else when I look?
[snip]
You're attempting to call one of S's member functions without
Different ability to access a property depending if I'm inside
something else when I look?
struct S
{
int a;
static int b;
int c() { return a; }
static int d() { return 3; }
int e() @property { return a; }
static int f() @property { return 3; }
}
void foo(S s)
{
I have a function that allocates a closure somewhere in it (as
shown by the result of -profile=gc).
I can't make the function nogc as it calls a lot of other GC
using code.
profilegc.log only gives me the line number of the function
signature, which doesn't give me any hint as to where in
On Sunday, 11 August 2019 at 20:15:34 UTC, Alex wrote:
On Sunday, 11 August 2019 at 16:05:20 UTC, John Colvin wrote:
I'm trying to narrow down exactly what patterns work with each
and how they overlap.
What I was trying to get at with the abstract method thing is
that
abstract class C
On Sunday, 11 August 2019 at 15:16:03 UTC, Alex wrote:
On Sunday, 11 August 2019 at 13:09:43 UTC, John Colvin wrote:
Ok. What would go wrong (in D) if I just replaced every
interface with an abstract class?
I think there's some confusion here, because B.foo is not
abstract. abstract
On Saturday, 10 August 2019 at 17:28:32 UTC, Alex wrote:
´´´
void main(){}
interface A { void fun(); }
abstract class B{ void fun(); }
class C : A{ void fun(){} }
class D : B{ /*override*/ void fun(){} }
´´´
case 1:
interface A and class C implementing interface A:
You don't need to "override"
On Saturday, 10 August 2019 at 17:46:37 UTC, Timon Gehr wrote:
On 10.08.19 16:29, John Colvin wrote:
Ok. What would go wrong (in D) if I just replaced every
interface with an abstract class?
interface A{}
interface B{}
class C: A,B{ }
Yes, I know, I guess it wasn't clear unless you read
On Saturday, 10 August 2019 at 10:11:15 UTC, Alex wrote:
On Saturday, 10 August 2019 at 08:20:46 UTC, John Colvin wrote:
On Friday, 9 August 2019 at 13:39:53 UTC, Simen Kjærås wrote:
Thanks for the extra detail.
Is there a solid reason to ever use an interface over an
abstract class
On Saturday, 10 August 2019 at 10:02:02 UTC, Antonio Corbi wrote:
On Saturday, 10 August 2019 at 08:20:46 UTC, John Colvin wrote:
On Friday, 9 August 2019 at 13:39:53 UTC, Simen Kjærås wrote:
Thanks for the extra detail.
Is there a solid reason to ever use an interface over an
abstract
On Friday, 9 August 2019 at 13:39:53 UTC, Simen Kjærås wrote:
Thanks for the extra detail.
Is there a solid reason to ever use an interface over an abstract
class? (Other than multiple inheritance).
I'm such a noob at anything related to OO.
On Friday, 9 August 2019 at 13:39:53 UTC, Simen Kjærås wrote:
We're getting into somewhat advanced topics now. This is
described in the Application Binary Interface page of the
documentation[0]. In short: classes and interfaces both use a
vtable[1] that holds pointers to each of their methods.
On Friday, 9 August 2019 at 13:19:14 UTC, kinke wrote:
On Friday, 9 August 2019 at 12:26:59 UTC, John Colvin wrote:
Why is there no "hi" between 0 and 1?
Because you are treating the unadjusted object pointer as
interface pointer and then call the only virtual function of
that
import std.stdio;
interface I
{
void foo();
}
class C : I
{
override void foo() { writeln("hi"); }
}
abstract class AC
{
void foo();
}
class D : AC
{
override void foo() { writeln("hi"); }
}
void main()
{
auto c = new C();
writeln(0);
(cast(I)cast(void*)c).foo();
On Thursday, 8 August 2019 at 23:46:38 UTC, Walter Bright wrote:
It's the end of an era. Symantec bought my company, Zortech,
and now is bought in return. The D community, and myself
personally, owe a debt of gratitude to Symantec.
You were lucky...
...in another age of the world they
On Tuesday, 16 July 2019 at 18:18:50 UTC, Atila Neves wrote:
On Tuesday, 16 July 2019 at 00:10:19 UTC, Aliak wrote:
On Monday, 15 July 2019 at 21:20:16 UTC, Atila Neves wrote:
On Monday, 15 July 2019 at 11:13:10 UTC, aliak wrote:
I've been using a set of meta tools for a while now, so
decided
On Wednesday, 8 May 2019 at 08:50:15 UTC, Mike Parker wrote:
Jens Mueller is speaking after Walter. His slides can be found
here:
Thanks for what you are doing here, I have looked at them all!
Is there a video and/or slides for Walter's keynote anywhere?
On Wednesday, 8 May 2019 at 11:53:34 UTC, Russel Winder wrote:
On Mon, 2019-05-06 at 15:53 +, John Colvin via
Digitalmars-d-learn wrote:
[…]
pretty please show people it with UFCS:
recurrence!((a, n) => a[n-1] + a[n-2])(zero, one)
.dropExactly(n)
.front
Any particular rea
On Monday, 6 May 2019 at 13:05:27 UTC, Russel Winder wrote:
On Sunday, 5 May 2019 at 19:34:05 UTC, Nicholas Wilson wrote:
On Sunday, 5 May 2019 at 19:18:47 UTC, lithium iodate wrote:
[...]
Yep https://run.dlang.io/is/XsLrRz works for me,
https://run.dlang.io/is/KxY0e9 doesn't.
Thanks
On Saturday, 9 February 2019 at 02:12:29 UTC, Murilo wrote:
Why is it that in C when I attribute the number
991234307654329925.7865 to a double it prints
991234299470108672. and in D it prints
9912342990. ? Apparently both languages
cause a certain loss
On Sunday, 27 January 2019 at 16:23:42 UTC, FrankLike wrote:
On Sunday, 27 January 2019 at 10:44:04 UTC, John Chapman wrote:
On Sunday, 27 January 2019 at 06:14:15 UTC, FrankLike wrote:
On Saturday, 26 January 2019 at 09:33:33 UTC, John Chapman
wrote:
What has that code got to do
On Sunday, 27 January 2019 at 06:14:15 UTC, FrankLike wrote:
On Saturday, 26 January 2019 at 09:33:33 UTC, John Chapman
wrote:
What has that code got to do with setting the console's font?
So you need to add more code to accomplish that.
You don't need to set the font to achieve the goal
On Saturday, 26 January 2019 at 06:03:25 UTC, FrankLike wrote:
On Friday, 25 January 2019 at 15:05:50 UTC, John Chapman wrote:
On Friday, 25 January 2019 at 14:23:15 UTC, FrankLike wrote:
I need to set the font by the code now, because I need to do
the installer, can't let this installer set
On Friday, 25 January 2019 at 14:23:15 UTC, FrankLike wrote:
I need to set the font by the code now, because I need to do
the installer, can't let this installer set the properties on
each computer?
SetCurrentConsoleFontEx perhaps?
On Monday, 21 January 2019 at 07:57:58 UTC, Simen Kjærås wrote:
On Saturday, 19 January 2019 at 14:26:31 UTC, Zenw wrote:
On Tuesday, 15 January 2019 at 11:14:54 UTC, John Burton wrote:
[...]
how about this
auto With(string code,T)(T value)
{
with(value)
{
mixin(code
On Thursday, 17 January 2019 at 01:43:42 UTC, SrMordred wrote:
struct Config
{
string title;
int width;
}
struct Window
{
this(Config config)
It likely is a bad idea for a small struct like this but if it
was much bigger would it makes sense to write this as :-
On Wednesday, 16 January 2019 at 14:59:01 UTC, Kagamin wrote:> On
Tuesday, 15 January 2019 at 11:14:54 UTC, John Burton wrote:
auto window = Window(title = "My Window", width = 1000,
fullscreen = true);
In this particular case I would make the constructor take 3
parameters -
On Thursday, 17 January 2019 at 01:43:42 UTC, SrMordred wrote:
On Tuesday, 15 January 2019 at 11:14:54 UTC, John Burton wrote:
[...]
Let me throw this idea here:
struct Config
{
string title;
int width;
}
struct Window
{
this(Config config
On Saturday, 12 January 2019 at 15:51:03 UTC, Andrei Alexandrescu
wrote:
https://youtube.com/watch?v=tcyb1lpEHm0
Now as to the talk, as you could imagine, it touches on another
Somebody on the C++ side has written a reply
On Wednesday, 16 January 2019 at 11:21:53 UTC, Dukc wrote:
On Tuesday, 15 January 2019 at 11:14:54 UTC, John Burton wrote:
This is ok, but I'm not so keen on separating the creation and
construction like this.
Is there a better way that's not ugly?
You can make the constructor a template
On Tuesday, 15 January 2019 at 12:15:41 UTC, rikki cattermole
wrote:
On 16/01/2019 1:05 AM, John Burton wrote:
On Tuesday, 15 January 2019 at 11:26:50 UTC, rikki cattermole
wrote:
Longer term, you're better off with the builder.
Thanks for your reply. But what is the builder?
https
On Tuesday, 15 January 2019 at 11:26:50 UTC, rikki cattermole
wrote:
Longer term, you're better off with the builder.
Thanks for your reply. But what is the builder?
Creating windows is a very complex task that can balloon in
scope.
Well that was mostly just an example that I thought
As an example let's say I have a type 'Window' that represents a
win32 window. I'd like to be able to construct an instance of the
type with some optional parameters that default to some
reasonable settings and create the underlying win32 window.
I'd ideally like some syntax like this :-
On Tuesday, 11 December 2018 at 08:20:32 UTC, Arun Chandrasekaran
wrote:
A typical example would be to split the HTTP query string into
an AA.
vibe.d has req.queryString, but no convenient wrapper to access
it as an AA.
http://localhost/hello?name=abc=123
I've got this far.
auto
On Saturday, 8 December 2018 at 13:02:00 UTC, Yuxuan Shui wrote:
This surprised me A LOT:
https://d.godbolt.org/z/82a_GZ
So if I call something.map!().array, I get an array of
delegates? That makes no sense to me.
But in your example, "(a) =>" returns "{return tmp;}", which is a
delegate.
I get an "ambiguous virtual function" error when I compile this:
interface I {
void fun();
}
mixin template F() {
void fun() {}
}
class C : I {
mixin F;
mixin F;
}
But the error doesn't occur with this:
class C : I {
mixin F;
void fun() {}
}
Is the
On Wednesday, 5 December 2018 at 10:52:44 UTC, Guillaume Piolat
wrote:
On Wednesday, 5 December 2018 at 01:57:53 UTC, evilrat wrote:
On Tuesday, 4 December 2018 at 20:41:54 UTC, Guillaume Piolat
wrote:
[...]
I was using gl3n then switched to gfm math. Try gfm, IIRC it
should work without
On Wednesday, 5 December 2018 at 01:57:53 UTC, evilrat wrote:
On Tuesday, 4 December 2018 at 20:41:54 UTC, Guillaume Piolat
wrote:
On Tuesday, 4 December 2018 at 20:33:07 UTC, John Burton wrote:
What is the best alternative for D, assuming there is
anything?
(I want vector, matrix math for use
There is a directx-d library which seems to work nicely for d3d11
but it doesn't include anything like DirectXMath.h presumably
because it's all implemented as inline intrinsics and very visual
c++ specific.
What is the best alternative for D, assuming there is anything?
(I want vector,
On Thursday, 29 November 2018 at 21:31:57 UTC, Neia Neutuladh
wrote:
On Thu, 29 Nov 2018 21:11:06 +, John Chapman wrote:
Is there any way to get a string representing a function's
exact signature as declared in the source? I can generate it
myself using reflection but it might not be 100
Is there any way to get a string representing a function's exact
signature as declared in the source? I can generate it myself
using reflection but it might not be 100% verbatim so wanted to
know if there's anything built in?
foreach (m; __traits(allMembers, T)) {
alias member =
On Thursday, 29 November 2018 at 13:42:28 UTC, greatsam4sure
wrote:
Which class in dlangui is use to obtain the screen height and
width?
A Windom of dimension 280 x 445 in dlangui is the same as a
Windom of 350 x 550 in Javafx and adobe air.
What could be responsible for this wide difference?
On Friday, 23 November 2018 at 21:49:55 UTC, Kagamin wrote:
Well, just have all factories in one module and import it, then
they will be visible.
They're part of another library over which I have no control, but
yes, I could still import them all and make life easier.
import allfactories;
On Friday, 23 November 2018 at 11:29:24 UTC, Nicholas Wilson
wrote:
No, std.functional.memoize uses a hashtable to cache the
runtime results of calls to expensive functions.
assuming that the example is not oversimplified and
generateFunc1 and generateFunc2 are functions, the compiler
I'm doing a fair amount of repeatedly checking if a function
compiles with __traits(compiles...), executing the function if
so, erroring out if not, like this:
static if (__traits(compiles, generateFunc1())) {
return generateFunc1();
} static if (__traits(compiles, generateFunc2())) {
On Thursday, 22 November 2018 at 16:27:08 UTC, Eduard Staniloiu
wrote:
So I had a go at this and I have a working solution.
https://run.dlang.io/is/oaH6Ib
At first, I tried to do everything in the mixin, as you can see
with the `failedAttempt` function. The idea was that this
should have
On Monday, 19 November 2018 at 16:29:01 UTC, helxi wrote:
On Monday, 19 November 2018 at 16:10:15 UTC, helxi wrote:
...
Oh wait never mind I was missing a bracket:
auto proc = task!(ddCall.dd());
Now I have another thing to worry about: ddcall.dd() cannot be
read at compile
On Saturday, 17 November 2018 at 21:11:38 UTC, Adam D. Ruppe
wrote:
On Saturday, 17 November 2018 at 17:58:54 UTC, John Chapman
wrote:
Has anyone had a similar need and come up with a solution?
You might be able to just pass it the Calendar type, and then
fetch its parent module and get
The following code doesn't compile because the generated type
name needs to be available inside the mixin's scope, whereas it's
actually in another module.
auto makeWith(string className, Args…)(auto ref Args args) {
mixin("return makeWith!(I", className, "Factory)(args);"); //
Fowarded to
On Thursday, 8 November 2018 at 20:19:47 UTC, Vladimir Panteleev
wrote:
On Thursday, 8 November 2018 at 19:07:32 UTC, Jacob Carlborg
wrote:
21 seconds on a Windows 10 virtual machine compiling using the
win32.mak file.
Sounds like we're narrowing it down to the Visual Studio
solution.
On Sunday, 4 November 2018 at 19:06:22 UTC, Mark Moorhen wrote:
Another Windows challenge:
I'm trying to get the title of the active window even if it is
from an external application. This is what I've come up with so
far:
import std.stdio;
import core.sys.windows.windows;
extern
On Tuesday, 30 October 2018 at 10:46:35 UTC, Mike Parker wrote:
On Tuesday, 30 October 2018 at 10:30:48 UTC, John Burton wrote:
I want to do some graphics using direct3d11 on windows.
There are some bindings that I used once before
https://github.com/evilrat666/directx-d
However
I want to do some graphics using direct3d11 on windows.
There are some bindings that I used once before
https://github.com/evilrat666/directx-d
However they are marked as [discontinued]
While I'm sure they will continue to work so wouldn't worry about
using this I wonder if there are any other
On Monday, 22 October 2018 at 00:22:19 UTC, Manu wrote:
On Sun, Oct 21, 2018 at 2:35 PM Walter Bright via Digitalmars-d
wrote:
On 10/21/2018 2:08 PM, Walter Bright wrote:
> On 10/21/2018 12:20 PM, Nicholas Wilson wrote:
>> Yes, but the problem you describe is arises from implicit
>>
Is there any documentation or information about the specifics of
the garbage collector?
The information I have found indicates that it runs to free
memory when the system runs out of memory to allocate. But will
this try to use all the system memory or some other amount before
trying to
On Sunday, 14 October 2018 at 13:07:30 UTC, Heromyth wrote:
On Monday, 8 October 2018 at 09:39:55 UTC, John Burton wrote:
My use case is sending data to a socket.
We have ported some containers from JAVA.
ByteBuffer is a basic container interface and widely used in
JAVA.
See also:
https
My use case is sending data to a socket.
One part of my program generates blocks of bytes, and the socket
part tries to send them to the socket and then removes from the
queue the number that got sent.
I am currently using a byte[] and using concatenation and slicing
to maintain the queue
On Thursday, 4 October 2018 at 07:31:21 UTC, Ritchie wrote:
Any reason why this works?
https://run.dlang.io/is/TALlyw
"private" applies to the module, not the type.
https://dlang.org/spec/attribute.html#visibility_attributes
On Monday, 1 October 2018 at 20:27:43 UTC, spikespaz wrote:
Of course there is nothing wrong with defining each callback as
a separate function, but then comes the issue of naming them. I
also don't like the way it makes my code look.
I think the best you can do is something like this:
---
On Thursday, 16 August 2018 at 20:30:26 UTC, John Belmonte wrote:
These are novel control structures for managing concurrency.
Combining this with cooperative multitasking and explicit,
plainly-visible context switching (i.e. async/await-- sorry
Olshansky) yields something truly
On Tuesday, 25 September 2018 at 12:05:21 UTC, Jonathan M Davis
wrote:
[...]
Thanks everyone.
Is there any documentation anywhere that deals with calling D
from C? I could find plenty the other way round. I think I'll
give up on the idea though, and rewrite the whole thing in D :)
I need to write a library to statically link into a c program.
Can I write this library in D?
Will I be able to use proper D abilities like gc? Obviously the
public interface will need to be basic c callable functions...
I 'main' is a c program will this work?
On Tuesday, 28 August 2018 at 20:05:32 UTC, Russel Winder wrote:
But that is the point, this is Python specific, and yet the
motivating example is a misunderstanding of how Go is used.
This inconsistency seriously undermines the general argument.
I don't believe I misunderstand how Go is
On Sunday, 9 September 2018 at 09:01:28 UTC, Ola Fosheim Grøstad
wrote:
Let's face it, the term "assert" has been poisoned by decades
of ambiguity.
There is really no ambiguity... The terminology is widespread
and well understood across the field I think.
Ahh, I so, so wish what you said
On Sunday, 2 September 2018 at 01:55:53 UTC, Walter Bright wrote:
On 9/1/2018 5:47 PM, Nick Sabalausky (Abscissa) wrote:
All in all, John is very non-committal about the whole thing.
He probably got tired of arguing about it :-)
Let's face it, the term "assert" has been poisoned
On Monday, 3 September 2018 at 06:26:59 UTC, Jonathan M Davis
wrote:
Well, if that were the intention, then -release could not
remove assertions from @safe code. -release does not remove
bounds checking from @safe code. You have to use
-boundscheck=off to disable assertions in @safe code
On Sunday, 2 September 2018 at 02:32:31 UTC, Jonathan M Davis
wrote:
On Saturday, September 1, 2018 2:15:15 PM MDT Walter Bright via
Digitalmars- d wrote:
https://blog.regehr.org/archives/1091
As usual, John nails it in a particularly well-written essay.
"ASSERT(expr)
As
On Thursday, 16 August 2018 at 20:37:33 UTC, Per Nordlöw wrote:
In
https://www.youtube.com/watch?v=nVzgkepAg5Y
Andrei describes his proposal for STL `Expected` planned to be
included in C++20.
Have anybody converted the C++ proposal to idiomatic D, yet?
Hopefully without the pointer-legacy
On Wednesday, 22 August 2018 at 16:49:01 UTC, Russel Winder wrote:
Have you tried asyncio in the Python standard library? Is Trio
better?
The library that Guido admits is a disaster?
https://twitter.com/gvanrossum/status/938445451908472832
Trio and libraries like it have evolved out of
On Monday, 27 August 2018 at 04:00:18 UTC, John Carter wrote:
Rather the assumption must be, a language processor eats
source, it can (re)write source as well.
And before any one mentions halting problems and the
impossibility of a compiler understanding whether a refactoring
is behaviour
On Saturday, 25 August 2018 at 20:52:06 UTC, Walter Bright wrote:
If I fix the bug, I break existing code, and apparently a
substantial amount of existing code. What's your advice on how
to proceed with this?
https://forum.dlang.org/post/ioiglnwckjsdrukpx...@forum.dlang.org
I've been
Or to put it another way
RAII should be
"Taking Ownership of a Resource is Initialization, and
relinquishing ownership is automatic at the object life time end,
but Failure to Acquire a Resource Is Not An Exceptional
Circumstance"
Not as catchy, but far less problematic.
On Friday, 24 August 2018 at 02:33:31 UTC, Jonathan M Davis wrote:
Walter Bright wrote:
My personal opinion is that constructors that throw are an
execrable programming practice, and I've wanted to ban them.
(Andrei, while sympathetic to the idea, felt that too many
people relied on it.) I
On Friday, 24 August 2018 at 15:26:30 UTC, kinke wrote:
On Friday, 24 August 2018 at 13:10:40 UTC, John Burton wrote:
Is in the subject. Are there any cross compilers that will run
on a linux system but compile D code using Win32 into a
windows .exe file, preferably 64 bit? I can find hints
Is in the subject. Are there any cross compilers that will run on
a linux system but compile D code using Win32 into a windows .exe
file, preferably 64 bit? I can find hints of cross compilers but
not really seen anything packaged up?
On Wednesday, 22 August 2018 at 13:17:00 UTC, Kagamin wrote:
On Monday, 20 August 2018 at 03:57:10 UTC, John Carter wrote:
* Choice. ie. Programmers _want_ to use it, not are
constrained to use it.
* For programming activity, not new projects. ie. The era of
vast tracts of green field
On Saturday, 18 August 2018 at 22:20:57 UTC, Walter Bright wrote:
On 8/18/2018 9:59 AM, Jonathan Marler wrote:
In your mind, what defines the D language's level of success?
It no longer needs me or Andrei.
I think that is a pretty weak measure.
Stroustrup and Matsumoto are still actively
golang.org/doc/go1.2#preemption).
Regards,
--John
On Thursday, 16 August 2018 at 23:33:04 UTC, H. S. Teoh wrote:
However, it would seem to require language support, no? It's
going to be a tough sell to Walter & Andrei if it requires
language support. (Though IMO it's worth it.)
To implement scoped nursery and cancellation? I hope it could
libraries to unify around
this.
I'll go out on a limb and say if this could happen in addition to
D addressing its GC dirty laundry, the language would actually be
an unstoppable force.
Regards,
--John
On Saturday, 4 August 2018 at 01:27:49 UTC, Laeeth Isharc wrote:
Thanks to Seb and Atila it is now very easy to show a D
program just #includeing C headers. If just works. Modulo
bugs. In time I am hopeful Atila will start to have more of
C++ headers working too.
On Thursday, 2 August 2018 at 08:40:55 UTC, John Colvin wrote:
On Thursday, 2 August 2018 at 07:47:19 UTC, aliak wrote:
Hi, just a release of a meta programming library
(https://bolts.dub.pm) that has utilities that I use in
personal projects, and that I find in phobos, and or in the
forums
On Thursday, 2 August 2018 at 07:47:19 UTC, aliak wrote:
Hi, just a release of a meta programming library
(https://bolts.dub.pm) that has utilities that I use in
personal projects, and that I find in phobos, and or in the
forums. A notable difference is that functions here try to
operate on
On Tuesday, 31 July 2018 at 21:29:26 UTC, Jean-Louis Leroy wrote:
How do I declare a variable that contains a pointer to a
function returning a reference?
import std.stdio;
int foo(return ref int a)
{
a = 42;
return a;
}
ref int bar(return ref int a)
{
a = 42;
On Friday, 27 July 2018 at 12:04:18 UTC, Jonathan M Davis wrote:
On Friday, July 27, 2018 5:03:50 AM MDT Seb via Digitalmars-d
wrote:
What do you think?
--
- Has the dmd/druntime split being annoying you too?
- Do you have a better suggestion?
- Would this break your workflow
On Monday, 23 July 2018 at 16:57:20 UTC, H. S. Teoh wrote:
On Mon, Jul 23, 2018 at 04:26:42PM +, Seb via Digitalmars-d
wrote:
tl;dr: the currently proposed syntax options are:
---
struct S
{
int a = 2, b = 4, c = 6;
}
void foo()
{
bar(S({c: 10})); // Option 1
bar(S(c: 10)); //
Interesting (and way too detailed for me) tale of GC adventures
in golang:
https://blog.golang.org/ismmkeynote
On Friday, 13 July 2018 at 13:15:39 UTC, Steven Schveighoffer
wrote:
But it doesn't scale if you use OS processes, it's too
heavyweight. Of course, it depends on the application. If you
only need 100 concurrent connections, processes might be OK.
I think you may have fallen for Microsoft
On Tuesday, 17 July 2018 at 18:21:26 UTC, H. S. Teoh wrote:
As we know, when opCmp is defined for a user type, then
opEquals must also be defined in order for == to work, even
though in theory the compiler could translate x==y into
x.opCmp(y)==0.
In the past, it was argued that this was so
Currently the API's don't support const(void)[], e.g.
import std.experimental.allocator : makeArray, theAllocator,
dispose;
import std.experimental.allocator.mallocator : Mallocator;
void main()
{
const a = theAllocator.makeArray!ubyte(100);
theAllocator.dispose(a);
// can't call
On Wednesday, 11 July 2018 at 12:45:40 UTC, crimaniak wrote:
The error should be maximally localized, and the programmer
should be able to respond to any type of errors. The very
nature of the work of WEB applications contributes to this. As
a rule, queries are handled by short-lived tasks
On Wednesday, 11 July 2018 at 15:58:05 UTC, Luís Marques wrote:
I was surprised to find out today that this compiles:
void foo() {}
void foo() {}
void main() {}
Is it a bug, or just a weird design decision? "alphaglosined"
on IRC seemed to think it was a regression. Please confirm, so
that I
On Monday, 9 July 2018 at 22:50:07 UTC, Mr.Bingo wrote:
On Tuesday, 3 July 2018 at 04:54:46 UTC, Walter Bright wrote:
On 7/2/2018 7:53 PM, John Carter wrote:
Step 2 is to (gradually) migrate std:: standard library
precondition violations in particular from exceptions (or
error codes
On Saturday, 7 July 2018 at 01:18:21 UTC, wjoe wrote:
But that's not how D works. It throws an Error which can be
caught.
If people are allowed to do something they assume it's
legitimate.
It should be a compile time error to catch an Error, but it
doesn't even emit a warning and it seems
On Tuesday, 3 July 2018 at 04:54:46 UTC, Walter Bright wrote:
On 7/2/2018 7:53 PM, John Carter wrote:
In general all pre/post/assert-condition violations) cause a
corrupted state that cannot be recovered from
programmatically, and so they should never be reported to the
calling code
On Tuesday, 3 July 2018 at 03:27:06 UTC, Ali wrote:
we have to thank Bertrand Meyer and his language Eiffel, for
that
True.
I was referring to the ideas in Walter's proposal
https://forum.dlang.org/thread/lrbpvj$mih$1...@digitalmars.com
https://herbsutter.com/2018/07/02/trip-report-summer-iso-c-standards-meeting-rapperswil/
This looks to me like a huge step forward for C++
* You get to install your own violation handler and ship a
release build with the option of turning on enforcement at run
time.
* You get to express
On Saturday, 16 June 2018 at 08:39:07 UTC, Dmitry Olshansky wrote:
On Friday, 15 June 2018 at 23:04:40 UTC, Sjoerd Nijboer wrote:
T* he `async` & `await` keyword from C# make proactor pattern
async code extremely easy to reason about.
God please no. Look at Go’s popularity because of dead
On Friday, 2 November 2012 at 20:12:05 UTC, so wrote:
On Friday, 2 November 2012 at 18:34:13 UTC, Jacob Carlborg
wrote:
I would absolutely say that the gap is getting thinner. I
would mostly say that with C++11 C++ has finally started to
catch up with D and the rest of the world.
Serious?
101 - 200 of 3543 matches
Mail list logo