text: Forum Index
  On Thursday, 18 November 2021 at 13:07:28 UTC, Ola Fosheim Grøstad wrote:
  > How can you bind something global to a common identifier like ```i```?
  That's not global.
  On 11/18/21 8:07 AM, Ola Fosheim Grøstad wrote:
  On Thursday, 18 November 2021 at 13:05:02 UTC, Steven Schveighoffer wrote:
  Let's adjust the straw in that man:
  How can you bind something global to a common identifier like i?
  i
  You are joking, right?
  Ironically, i is almost never a global identifier. Using it for a global identifier works because UFCS is not allowed on locals.
  import std.complex;
  auto i(double v)
  {
  return complex(0, v);
  }
  void main()
  {
  int i = 5;
  auto c = (6 + 2.5.i - 1 + 3.i) / 3.i;
  }
  -Steve
  On Thursday, 18 November 2021 at 13:27:15 UTC, Steven Schveighoffer wrote:
  But you would have to stuff it into std.complex for it to be a library feature. So if someone else uses i(double) it would mess up everything.
  i(double)
  That is not what Rumba asked for, he "asked" for something that was simple to use.
  On Thursday, 18 November 2021 at 04:24:56 UTC, rumbu wrote:
  On Wednesday, 17 November 2021 at 21:46:45 UTC, Atila Neves wrote:
  On Tuesday, 16 November 2021 at 18:17:29 UTC, Rumbu wrote:
  At least from my point of view, it seems that recently D made a shift from a general purpose language to a C successor,
  I mean, it kind of always was, which is even indicated in the name.
  I am here when D was advertised as a general purpose language. The last development efforts are concentrated around making a better C, not a better D.
  I don't see "a better C" and "a general purpose language" as mutually exclusive. Do you disagree?
  Where would you say D has failed to evolve in terms of OOP?
  As you've mentioned, we're not going to agree. I don't think this is failing to evolve either since it's by design.
  Inheritance (subtyping) and value types don't mix.
  Could you please explain what these mean?
  What's missing??
  Personnaly I want gc to stay and improve. But when I see the language trying its best to please the gc haters,
  In my view it's not really about pleasing the GC haters as much as it's acknowledging that the GC isn't always the best choice, and making sure that we can write memory-safe programs without it.
  I wonder if the GC is the right default memory management in D.
  I believe it is, yes.
  Finally, I found something from the old D1 page:
  Complex Numbers
  A detailed comparison with C++'s std::complex..
  15 years ago. I will reply with this quote to everyone who has "another library solution".
  Library solution:
  auto c = (6 + 2.i - 1 + 3.i) / 3.i;
  I'd disagree it's "no contest". I think that 2021 Walter would disagree as well but he can disprove me here if not the case.
  On Thursday, 18 November 2021 at 13:26:43 UTC, Adam D Ruppe wrote:
  On Thursday, 18 November 2021 at 13:07:28 UTC, Ola Fosheim Grøstad wrote:
  That's not global.
  That's a rather pedantic statement.
  Oh well, then nothing user defined is global, everything is nested within something else.
  On Wednesday, 17 November 2021 at 21:59:51 UTC, Ola Fosheim Grøstad?
  On Thursday, 18 November 2021 at 13:37:57 UTC, Ola Fosheim Grøstad wrote:
  >> That's not global.
  >
  > That's a rather pedantic statement.
  It is an important distinction since you get this if you want it and don't get it if you don't.
  On 11/18/21 8:25 AM, Tejas wrote:
  This is amazing :D
  D is quite amazing, especially with some of these syntax sugar features ;)
  But, this has not been documented anywhere in the std.complex page, so I don't feel its fair to say that rumbu is making a straw man argument.
  std.complex
  The strawman is from the D1 page, it compares its current implementation to a fictitious complex number implementation (that didn't exist back then), making it look as bad as possible.
  I'm using the actual implementation of the library that now does exist. Note that UFCS does not exist in D1 for anything other than arrays, so in D1 that rewrite is not possible.
  The i function is not in std.complex, which is a shame, I think it should be. But I've never used complex numbers so I haven't cared.
  On Thursday, 18 November 2021 at 13:37:28 UTC, Atila Neves wrote:
  [...]
  I don't know about the other stuff, but explicit interface implementation is this:
  On Wednesday, 17 November 2021 at 23:45:31 UTC, Ola Fosheim Grøstad wrote:.
  And those feature would be...?