Re: Why many programmers don't like GC?

2021-01-15 Thread Imperatorn via Digitalmars-d-learn
On Friday, 15 January 2021 at 07:35:00 UTC, H. S. Teoh wrote: On Thu, Jan 14, 2021 at 12:36:12PM +, claptrap via Digitalmars-d-learn wrote: [...] [...] To be fair, the GC *has* improved over the years. Just not as quickly as people would like, but it *has* improved. [...] Nice strate

Re: Why many programmers don't like GC?

2021-01-15 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 15 January 2021 at 07:35:00 UTC, H. S. Teoh wrote: To be fair, the GC *has* improved over the years. Just not as quickly as people would like, but it *has* improved. It cannot improve enough as a global collector without write barriers. No language has been able to do this. Therefo

Re: Directory recursive walking

2021-01-15 Thread dog2002 via Digitalmars-d-learn
On Friday, 15 January 2021 at 06:15:06 UTC, dog2002 wrote: On Thursday, 14 January 2021 at 22:28:19 UTC, Paul Backus wrote: On Thursday, 14 January 2021 at 20:23:37 UTC, dog2002 wrote: [...] What code are you using to copy the bytes? If you're reading the whole file into memory at once, that

Re: Directory recursive walking

2021-01-15 Thread Daniel Kozak via Digitalmars-d-learn
On Fri, Jan 15, 2021 at 10:30 AM dog2002 via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > ... > Okay, the reason is incredibly stupid: using WinMain instead of > main causes high memory usage. I don't know why, I use the same > code. If I replace WinMain with main, the memory

Re: Why many programmers don't like GC?

2021-01-15 Thread Mike Parker via Digitalmars-d-learn
On Friday, 15 January 2021 at 08:49:21 UTC, Imperatorn wrote: Nice strategy, using GC and optimizing where you need it. That's the whole point of being able to mix and match. Anyone avoiding the GC completely is missing it (unless they really, really, must be GC-less).

Re: Why many programmers don't like GC?

2021-01-15 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 15 January 2021 at 11:11:14 UTC, Mike Parker wrote: That's the whole point of being able to mix and match. Anyone avoiding the GC completely is missing it (unless they really, really, must be GC-less). Has DMD switched to using the GC as the default?

Re: Open question: what code pattern you use usually for null safety problem

2021-01-15 Thread ddcovery via Digitalmars-d-learn
On Thursday, 14 January 2021 at 18:24:44 UTC, ddcovery wrote: I know there is other threads about null safety and the "possible" ways to support this in D and so on. This is only an open question to know what code patterns you usually use to solve this situation in D I'm writing a "persona

Re: Directory recursive walking

2021-01-15 Thread dog2002 via Digitalmars-d-learn
On Friday, 15 January 2021 at 11:05:56 UTC, Daniel Kozak wrote: On Fri, Jan 15, 2021 at 10:30 AM dog2002 via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: ... Okay, the reason is incredibly stupid: using WinMain instead of main causes high memory usage. I don't know why, I us

To switch GC from FIFO to LIFO paradigm.

2021-01-15 Thread MGW via Digitalmars-d-learn
GC cleans memory using the FIFO paradigm. Is it possible to switch GC to work using the LIFO paradigm?

Re: Open question: what code pattern you use usually for null safety problem

2021-01-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/14/21 7:27 PM, ddcovery wrote: On Thursday, 14 January 2021 at 20:23:08 UTC, Steven Schveighoffer wrote: You could kinda automate it like: struct NullCheck(T) {    private T* _val;    auto opDispatch(string mem)() if (__traits(hasMember, T, mem)) {    alias Ret = typeof(() { return __

Re: To switch GC from FIFO to LIFO paradigm.

2021-01-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/15/21 7:39 AM, MGW wrote: GC cleans memory using the FIFO paradigm. Is it possible to switch GC to work using the LIFO paradigm? I'm not sure what you mean. I don't think there's any guaranteed order for GC cleanup. -Steve

Re: Why many programmers don't like GC?

2021-01-15 Thread welkam via Digitalmars-d-learn
On Friday, 15 January 2021 at 11:28:55 UTC, Ola Fosheim Grøstad wrote: On Friday, 15 January 2021 at 11:11:14 UTC, Mike Parker wrote: That's the whole point of being able to mix and match. Anyone avoiding the GC completely is missing it (unless they really, really, must be GC-less). Has DMD s

Re: Open question: what code pattern you use usually for null safety problem

2021-01-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/15/21 9:19 AM, Steven Schveighoffer wrote: Something similar to BlackHole or WhiteHole. Essentially there's a default action for null for all types/fields/methods, and everything else is passed through. And now reading the other thread about this above, it looks like this type is alread

Re: Open question: what code pattern you use usually for null safety problem

2021-01-15 Thread Imperatorn via Digitalmars-d-learn
On Friday, 15 January 2021 at 14:25:09 UTC, Steven Schveighoffer wrote: On 1/15/21 9:19 AM, Steven Schveighoffer wrote: Something similar to BlackHole or WhiteHole. Essentially there's a default action for null for all types/fields/methods, and everything else is passed through. And now read

Re: Why many programmers don't like GC?

2021-01-15 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 15 January 2021 at 14:24:40 UTC, welkam wrote: You can use GC with D compiler by passing -lowmem flag. I didnt measure but I heard it can increase compilation time by 3x. Thanks for the info. 3x is a lot though, maybe it could be improved with precise collection, but I assume that w

Re: Why many programmers don't like GC?

2021-01-15 Thread welkam via Digitalmars-d-learn
On Thursday, 14 January 2021 at 18:51:16 UTC, Ola Fosheim Grøstad wrote: One can follow the same kind of reasoning for D. It makes no sense for people who want to stay high level and do batch programming. Which is why this disconnect exists in the community... I think. The reasoning of why we

Re: How to get call stack for InvalidMemoryOperationError while doing unittest?

2021-01-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/13/21 1:22 PM, apz28 wrote: core.exception.InvalidMemoryOperationError@src\core\exception.d(647): Invalid memory operation I've struggled with this as well. It doesn't even tell you the original usage point that causes the exception. I believe stack traces are disabled from printing on

Re: Why many programmers don't like GC?

2021-01-15 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 15 January 2021 at 14:50:00 UTC, welkam wrote: The reasoning of why we do not implement write barriers is that it will hurt low level programming. But I feel like if we drew a ven diagram of people who rely on GC and those who do a lot of writes trough a pointer we would get almost n

Re: Why many programmers don't like GC?

2021-01-15 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 15 January 2021 at 14:59:18 UTC, Ola Fosheim Grøstad wrote: On Friday, 15 January 2021 at 14:50:00 UTC, welkam wrote: avoid redundant pointers. For instance, a type for telling the compiler that a pointer is non-owning. I guess "non-owning" is the wrong term. I mean pointers that ar

Re: Why many programmers don't like GC?

2021-01-15 Thread IGotD- via Digitalmars-d-learn
On Friday, 15 January 2021 at 14:24:40 UTC, welkam wrote: No. And it will never will. Currently DMD uses custom allocator for almost everything. It works as follows. Allocate a big chunk(1MB) of memory using malloc. Have a internal pointer that points to the beginning of unallocated memory. W

Re: Why many programmers don't like GC?

2021-01-15 Thread jmh530 via Digitalmars-d-learn
On Friday, 15 January 2021 at 14:50:00 UTC, welkam wrote: On Thursday, 14 January 2021 at 18:51:16 UTC, Ola Fosheim Grøstad wrote: One can follow the same kind of reasoning for D. It makes no sense for people who want to stay high level and do batch programming. Which is why this disconnect exi

Re: Why many programmers don't like GC?

2021-01-15 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 15 January 2021 at 15:18:31 UTC, IGotD- wrote: Bump the pointer is a very fast way to allocate memory but what is more interesting is what happens when you return the memory. What does the allocator do with chunks of free memory? Does it put it in a free list, does it merge chunks? I

Re: Why many programmers don't like GC?

2021-01-15 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 15 January 2021 at 15:20:05 UTC, jmh530 wrote: Hypothetically, would it be possible for users to supply their own garbage collector that uses write barriers? Yes. You could translate Google Chrome's Oilpan to D. It uses library smart pointers for dirty-marking. But it requires you t

Re: Why many programmers don't like GC?

2021-01-15 Thread welkam via Digitalmars-d-learn
On Friday, 15 January 2021 at 14:35:55 UTC, Ola Fosheim Grøstad wrote: On Friday, 15 January 2021 at 14:24:40 UTC, welkam wrote: You can use GC with D compiler by passing -lowmem flag. I didnt measure but I heard it can increase compilation time by 3x. Thanks for the info. 3x is a lot Take it

Re: Why many programmers don't like GC?

2021-01-15 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Jan 15, 2021 at 03:18:31PM +, IGotD- via Digitalmars-d-learn wrote: [...] > Bump the pointer is a very fast way to allocate memory but what is > more interesting is what happens when you return the memory. What does > the allocator do with chunks of free memory? Does it put it in a free

Re: Why many programmers don't like GC?

2021-01-15 Thread Guillaume Piolat via Digitalmars-d-learn
On Friday, 15 January 2021 at 11:11:14 UTC, Mike Parker wrote: That's the whole point of being able to mix and match. Anyone avoiding the GC completely is missing it (unless they really, really, must be GC-less). +1 mix and match is a different style versus only having a GC, or only having

Re: Why many programmers don't like GC?

2021-01-15 Thread welkam via Digitalmars-d-learn
On Friday, 15 January 2021 at 15:18:31 UTC, IGotD- wrote: I have a feeling that bump the pointer is not the complete algorithm that D uses because of that was the only one, D would waste a lot of memory. Freeing memory is for loosers :D https://issues.dlang.org/show_bug.cgi?id=21248 DMD alloc

Re: Static constructor

2021-01-15 Thread ludo via Digitalmars-d-learn
I believe so. I've never used OpenAL so it may have additional restrictions with multithreading, but from a simple "This function is only ever executed on one thread at a time", your above suggestions should work. Apologies for the late reply. No worry and thank you. I found the low-lock pat

Re: Static constructor

2021-01-15 Thread Imperatorn via Digitalmars-d-learn
On Friday, 15 January 2021 at 16:04:02 UTC, ludo wrote: I believe so. I've never used OpenAL so it may have additional restrictions with multithreading, but from a simple "This function is only ever executed on one thread at a time", your above suggestions should work. Apologies for the late

Re: Why many programmers don't like GC?

2021-01-15 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 15 January 2021 at 15:48:07 UTC, welkam wrote: On Friday, 15 January 2021 at 14:35:55 UTC, Ola Fosheim Grøstad wrote: improved with precise collection Precise GC is slower than default GC. D does not have a fully precise GC. The "precise" collector still scans things conservativel

Re: To switch GC from FIFO to LIFO paradigm.

2021-01-15 Thread Imperatorn via Digitalmars-d-learn
On Friday, 15 January 2021 at 12:39:30 UTC, MGW wrote: GC cleans memory using the FIFO paradigm. Is it possible to switch GC to work using the LIFO paradigm? AFAIK the GC just sweeps, and the only queue is for destructors (unreachable memory) iirc

Re: Why many programmers don't like GC?

2021-01-15 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 15 January 2021 at 15:50:59 UTC, Guillaume Piolat wrote: On Friday, 15 January 2021 at 11:11:14 UTC, Mike Parker wrote: That's the whole point of being able to mix and match. Anyone avoiding the GC completely is missing it (unless they really, really, must be GC-less). +1 mix and

Re: Why many programmers don't like GC?

2021-01-15 Thread jmh530 via Digitalmars-d-learn
On Friday, 15 January 2021 at 15:36:37 UTC, Ola Fosheim Grøstad wrote: On Friday, 15 January 2021 at 15:20:05 UTC, jmh530 wrote: Hypothetically, would it be possible for users to supply their own garbage collector that uses write barriers? Yes. You could translate Google Chrome's Oilpan to D.

Re: Why many programmers don't like GC?

2021-01-15 Thread IGotD- via Digitalmars-d-learn
On Friday, 15 January 2021 at 15:50:50 UTC, H. S. Teoh wrote: DMD *never* frees anything. *That's* part of why it's so fast; it completely drops the complexity of tracking free lists and all of that jazz. That's also why it's a gigantic memory hog that can be a big embarrassment when run o

Re: Static constructor

2021-01-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/6/21 12:05 PM, ludo wrote: I read in the documentation "Static constructors are used to initialize static class members with values that cannot be computed at compile time" I try to understand the design of the following code: --- class OpenAL { static string[int] ALErrorLookup;   

Re: Why many programmers don't like GC?

2021-01-15 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 15 January 2021 at 16:21:43 UTC, jmh530 wrote: On Friday, 15 January 2021 at 15:36:37 UTC, Ola Fosheim Grøstad wrote: The library smart pointers would make it difficult to interact with existing D GC code though. Yes. So it would be better to do it automatically in the compiler for

Re: Why many programmers don't like GC?

2021-01-15 Thread Guillaume Piolat via Digitalmars-d-learn
On Friday, 15 January 2021 at 16:21:18 UTC, Ola Fosheim Grøstad wrote: What do you mean by "mix and match"? If it means shutting down the GC after initialization then it can easily backfire for more complicated software that accidentally calls code that relies on the GC. I mean: "using GC,

Re: Why many programmers don't like GC?

2021-01-15 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 15 January 2021 at 16:26:59 UTC, Guillaume Piolat wrote: Until someone can describe a strategy that works for a full application, e.g. an animation-editor or something like that, it is really difficult to understand what is meant by it. Personal examples: - The game Vibrant uses GC

Re: Open question: what code pattern you use usually for null safety problem

2021-01-15 Thread ddcovery via Digitalmars-d-learn
On Friday, 15 January 2021 at 14:19:35 UTC, Steven Schveighoffer wrote: On 1/14/21 7:27 PM, ddcovery wrote: On Thursday, 14 January 2021 at 20:23:08 UTC, Steven Schveighoffer wrote: You could kinda automate it like: struct NullCheck(T) {    private T* _val;    auto opDispatch(string mem)() if

Re: Why many programmers don't like GC?

2021-01-15 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Jan 15, 2021 at 04:22:59PM +, IGotD- via Digitalmars-d-learn wrote: [...] > Are we talking about the same things here? You mentioned DMD but I was > talking about programs compiled with DMD (or GDC, LDC), not the nature > of the DMD compiler in particular. > > Bump the pointer and neve

Re: Why many programmers don't like GC?

2021-01-15 Thread welkam via Digitalmars-d-learn
On Wednesday, 13 January 2021 at 18:58:56 UTC, Marcone wrote: I've always heard programmers complain about Garbage Collector GC. But I never understood why they complain. What's bad about GC? Most people get to know GC trough Java or C#. Those languages promote the use of OOP and they say tha

Re: Why many programmers don't like GC?

2021-01-15 Thread jmh530 via Digitalmars-d-learn
On Friday, 15 January 2021 at 16:22:59 UTC, IGotD- wrote: [snip] Are we talking about the same things here? You mentioned DMD but I was talking about programs compiled with DMD (or GDC, LDC), not the nature of the DMD compiler in particular. Bump the pointer and never return any memory might

How can I specify flags for the compiler when --build=release in dub?

2021-01-15 Thread Jack via Digitalmars-d-learn
is this possible? if so, how?

Re: How can I specify flags for the compiler when --build=release in dub?

2021-01-15 Thread evilrat via Digitalmars-d-learn
On Friday, 15 January 2021 at 17:02:32 UTC, Jack wrote: is this possible? if so, how? You can add extra options for for platform and compiler, and IIRC for build type too. For example like this for lflags, it might complain about the order so just follow the instructions. "lflags-debug" "

Re: Open question: what code pattern you use usually for null safety problem

2021-01-15 Thread ddcovery via Digitalmars-d-learn
On Friday, 15 January 2021 at 14:25:09 UTC, Steven Schveighoffer wrote: On 1/15/21 9:19 AM, Steven Schveighoffer wrote: Something similar to BlackHole or WhiteHole. Essentially there's a default action for null for all types/fields/methods, and everything else is passed through. And now read

Re: Open question: what code pattern you use usually for null safety problem

2021-01-15 Thread Dukc via Digitalmars-d-learn
On Thursday, 14 January 2021 at 18:24:44 UTC, ddcovery wrote: This is only an open question to know what code patterns you usually use to solve this situation in D: if(person.father.father.name == "Peter") doSomething(); if(person.father.age > 80 ) doSomething(); knowing that *person*, or

Re: Why many programmers don't like GC?

2021-01-15 Thread Guillaume Piolat via Digitalmars-d-learn
On Friday, 15 January 2021 at 16:37:46 UTC, Ola Fosheim Grøstad wrote: But when do you call collect? Do you not create more and more long-lived objects? Calling collect() isn't very good, it's way better to ensure the GC heap is relatively small, hence easy to traverse. You can use -gc=profi

Re: Why many programmers don't like GC?

2021-01-15 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 15 January 2021 at 18:43:44 UTC, Guillaume Piolat wrote: Calling collect() isn't very good, it's way better to ensure the GC heap is relatively small, hence easy to traverse. You can use -gc=profile for this (noting that things that can't contain pointer, such as ubyte[], scan way fas

Re: Why many programmers don't like GC?

2021-01-15 Thread Guillaume Piolat via Digitalmars-d-learn
On Friday, 15 January 2021 at 18:55:27 UTC, Ola Fosheim Grøstad wrote: On Friday, 15 January 2021 at 18:43:44 UTC, Guillaume Piolat wrote: Calling collect() isn't very good, it's way better to ensure the GC heap is relatively small, hence easy to traverse. You can use -gc=profile for this (notin

Re: Why many programmers don't like GC?

2021-01-15 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 15 January 2021 at 19:37:12 UTC, Guillaume Piolat wrote: A small GC heap is sufficient. There is this blog post where there was a quantitative measure of the sub-1ms D GC heap size. That's ok for a small game, but not for applications that grow over time or projects where the requi

Re: To switch GC from FIFO to LIFO paradigm.

2021-01-15 Thread tsbockman via Digitalmars-d-learn
On Friday, 15 January 2021 at 12:39:30 UTC, MGW wrote: GC cleans memory using the FIFO paradigm. Is it possible to switch GC to work using the LIFO paradigm? As others already said, the current GC isn't FIFO; it just scans everything once in a while a frees whatever it can, new or old. Howev

Re: To switch GC from FIFO to LIFO paradigm.

2021-01-15 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Jan 15, 2021 at 08:19:18PM +, tsbockman via Digitalmars-d-learn wrote: [...] > However, generational GCs are somewhat closer to LIFO than what we > have now, which does provide some performance gains under common usage > patterns. People have discussed adding a generational GC to D in

Re: Why many programmers don't like GC?

2021-01-15 Thread welkam via Digitalmars-d-learn
On Friday, 15 January 2021 at 07:35:00 UTC, H. S. Teoh wrote: (1) Refactored one function called from an inner loop to reuse a buffer instead of allocating a new one each time, thus eliminating a large amount of garbage from small allocations; <...> The result was about 40-50% reduction in runt

Re: Why many programmers don't like GC?

2021-01-15 Thread aberba via Digitalmars-d-learn
On Friday, 15 January 2021 at 19:49:34 UTC, Ola Fosheim Grøstad wrote: On Friday, 15 January 2021 at 19:37:12 UTC, Guillaume Piolat wrote: A small GC heap is sufficient. There is this blog post where there was a quantitative measure of the sub-1ms D GC heap size. That's ok for a small game, b

Re: Why many programmers don't like GC?

2021-01-15 Thread aberba via Digitalmars-d-learn
On Friday, 15 January 2021 at 21:15:29 UTC, aberba wrote: On Friday, 15 January 2021 at 19:49:34 UTC, Ola Fosheim Grøstad wrote: [...] Isn't it more theoretical/imaginary/hypothetical than something really measured from a real-world use case? Almost all large software use cases I've seen use

Re: Why many programmers don't like GC?

2021-01-15 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 15 January 2021 at 21:15:29 UTC, aberba wrote: Isn't it more theoretical/imaginary/hypothetical than something really measured from a real-world use case? Almost all large software use cases I've seen used mix and match. No?! Chrome has a garbage collector because JavaScript acquire

Re: Why many programmers don't like GC?

2021-01-15 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Jan 15, 2021 at 09:04:13PM +, welkam via Digitalmars-d-learn wrote: > On Friday, 15 January 2021 at 07:35:00 UTC, H. S. Teoh wrote: > > (1) Refactored one function called from an inner loop to reuse a > > buffer instead of allocating a new one each time, thus eliminating a > > large amo

Re: Why many programmers don't like GC?

2021-01-15 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 15 January 2021 at 21:18:55 UTC, aberba wrote: TL;DR: In summation, the garbage collection system is a robust part of Unreal Engine that affords C++ programmers a lot of safety from memory leaks, as well as convenience. With this high-level discussion, I was aiming to introduce the

Re: Why many programmers don't like GC?

2021-01-15 Thread Max Haughton via Digitalmars-d-learn
On Friday, 15 January 2021 at 21:49:07 UTC, H. S. Teoh wrote: On Fri, Jan 15, 2021 at 09:04:13PM +, welkam via Digitalmars-d-learn wrote: [...] As the joke goes, "you can write assembly code in any language". :-D If you code in a sloppy way, it doesn't matter what language you write in,

Re: Why many programmers don't like GC?

2021-01-15 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Friday, 15 January 2021 at 22:13:01 UTC, Max Haughton wrote: I think the way forward is some robust move semantics and analysis like Rust. I suppose ideally we would have some kind of hidden ARC behind the scenes but I don't know how that would play with structs. If they are heap allocated

Re: Open question: what code pattern you use usually for null safety problem

2021-01-15 Thread Basile B. via Digitalmars-d-learn
On Thursday, 14 January 2021 at 18:24:44 UTC, ddcovery wrote: I know there is other threads about null safety and the "possible" ways to support this in D and so on. [...] If it's not a bother, I'd like to know how you usually approach it [...] Thanks!!! I have a opDispatch solution here [

Re: Why many programmers don't like GC?

2021-01-15 Thread Guillaume Piolat via Digitalmars-d-learn
On Friday, 15 January 2021 at 19:49:34 UTC, Ola Fosheim Grøstad wrote: Many open source projects (and also some commercial ones) work ok for small datasets, but tank when you increase the dataset. So "match and mix" basically means use it for prototyping, but do-not-rely-on-it-if-you-can-avoi

Template alias as template specialisation not recognized.

2021-01-15 Thread Paul via Digitalmars-d-learn
I'm having issues when trying to use a template alias as a template specialisation. When using the following: alias Vec(uint size, Type) = Mat!(size, 1, Type); void setUniform(V : Vec!(L, bool), int L)(string name, V value) {...} Vec!(4, bool) a; setUniform("test", a); I get the followin

Re: Template alias as template specialisation not recognized.

2021-01-15 Thread Paul Backus via Digitalmars-d-learn
On Saturday, 16 January 2021 at 01:21:24 UTC, Paul wrote: I'm having issues when trying to use a template alias as a template specialisation. When using the following: alias Vec(uint size, Type) = Mat!(size, 1, Type); void setUniform(V : Vec!(L, bool), int L)(string name, V value) {...} V

Re: Template alias as template specialisation not recognized.

2021-01-15 Thread Paul via Digitalmars-d-learn
On Saturday, 16 January 2021 at 01:38:38 UTC, Paul Backus wrote: You have encountered issue 1807: https://issues.dlang.org/show_bug.cgi?id=1807 Ah I see, thank you, sad to see several DIP's I'd be interested in are postponed :( Thanks for the workaround hint, I'll probably be using that.

Re: Template alias as template specialisation not recognized.

2021-01-15 Thread Basile B. via Digitalmars-d-learn
On Saturday, 16 January 2021 at 01:21:24 UTC, Paul wrote: I'm having issues when trying to use a template alias as a template specialisation. When using the following: alias Vec(uint size, Type) = Mat!(size, 1, Type); void setUniform(V : Vec!(L, bool), int L)(string name, V value) {...} V