Re: tardy v0.0.1 - Runtime polymorphism without inheritance

2020-06-17 Thread Sebastiaan Koppe via Digitalmars-d-announce
On Wednesday, 17 June 2020 at 16:01:29 UTC, Paul Backus wrote: A while ago, I collaborated briefly with Adam Kowalski from the Dlang discord server on some code to emulate C++-style argument-dependent lookup in D. Using that code, your example above would be written: Geometry.create(r.ext

Re: tardy v0.0.1 - Runtime polymorphism without inheritance

2020-06-17 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 17 June 2020 at 16:01:29 UTC, Paul Backus wrote: [snip] IMO this can be done more elegantly by separating out the code that looks up methods in the current module from the code that does the actual type erasure. A while ago, I collaborated briefly with Adam Kowalski from the D

Re: tardy v0.0.1 - Runtime polymorphism without inheritance

2020-06-17 Thread Paul Backus via Digitalmars-d-announce
On Tuesday, 16 June 2020 at 13:31:49 UTC, Atila Neves wrote: With a few changes, yes (added missing semicolons, changed IGeometry to Geometry in `measure`, passed the current module so tardy can find the UFCS functions, added `@safe pure` to the UFCS functions: [...] void main() {

Re: tardy v0.0.1 - Runtime polymorphism without inheritance

2020-06-17 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 17 June 2020 at 11:46:12 UTC, Atila Neves wrote: [snip] I think these questions are good motivators for making it interface-only since then I don't have to check for data definitions. Makes sense.

Re: tardy v0.0.1 - Runtime polymorphism without inheritance

2020-06-17 Thread Atila Neves via Digitalmars-d-announce
On Wednesday, 17 June 2020 at 11:31:09 UTC, jmh530 wrote: On Wednesday, 17 June 2020 at 10:04:59 UTC, Atila Neves wrote: [...] Cool. [...] If I'm understanding you correctly, you could modify Polymorphic (and a similar change to VirtualTable) to struct Polymorphic(Interface, InstanceAll

Re: tardy v0.0.1 - Runtime polymorphism without inheritance

2020-06-17 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 17 June 2020 at 10:04:59 UTC, Atila Neves wrote: [snip] I was going to say "it should work" but instead I wrote the code and... it does. It all falls out of how UFCS works and usual language rules. https://github.com/atilaneves/tardy/blob/feb26282608081098134c8846be87d398772ccb

Re: tardy v0.0.1 - Runtime polymorphism without inheritance

2020-06-17 Thread Atila Neves via Digitalmars-d-announce
On Wednesday, 17 June 2020 at 10:43:35 UTC, Stanislav Blinov wrote: On Saturday, 13 June 2020 at 15:11:49 UTC, Atila Neves wrote: Tardy lets users have their cake and eat it too by not making them have to use classes for runtime polymorphism. I've got to ask though. Why "tardy"? Search engine

Re: tardy v0.0.1 - Runtime polymorphism without inheritance

2020-06-17 Thread Stanislav Blinov via Digitalmars-d-announce
On Saturday, 13 June 2020 at 15:11:49 UTC, Atila Neves wrote: Tardy lets users have their cake and eat it too by not making them have to use classes for runtime polymorphism. I've got to ask though. Why "tardy"? Search engines be damned? :)

Re: tardy v0.0.1 - Runtime polymorphism without inheritance

2020-06-17 Thread Atila Neves via Digitalmars-d-announce
On Tuesday, 16 June 2020 at 15:50:07 UTC, jmh530 wrote: On Tuesday, 16 June 2020 at 13:31:49 UTC, Atila Neves wrote: [snip] Pretty cool, thanks for the fixups. It may make for a good documentation example, in that it may help make clear that you need to pass the module in somehow when deali

Re: LDC 1.22.0

2020-06-17 Thread Greatsam4sure via Digitalmars-d-announce
On Tuesday, 16 June 2020 at 20:12:12 UTC, kinke wrote: Glad to announce LDC 1.22 - some highlights: - Based on D 2.092.1+. - AArch64: C(++) interop should now be on par with x86_64, and variadics usable with core.{vararg,stdc.stdarg}. - Windows hosts: Auto-detection & setup of installed Visual