while it may very well be possible to do something
along the lines of what you're looking for, I strongly suspect
that it's simply not worth it.
You might have gotten me wrong. I don’t want to do something with
it, I wondered if overloading based on attributes is a thing one
has to con
On Monday, July 31, 2023 4:55:44 AM MDT Quirin Schroll via Digitalmars-d-learn
wrote:
> Apparently, functions can be overloaded solely distinguished by
> attributes:
> ```d
> void f(ref int x) pure { x = 1; }
> void f(ref int x) { x = 2; static int s; ++s; }
> ```
>
> I thought that, maybe, a
On Monday, 31 July 2023 at 16:52:03 UTC, Dennis wrote:
On Monday, 31 July 2023 at 16:09:11 UTC, bachmeier wrote:
Is there a reason it would be difficult to make this not
compile?
No, except that might result in code breakage.
The only way you could have code breakage is if you have
```
void
On Monday, 31 July 2023 at 16:09:11 UTC, bachmeier wrote:
Is there a reason it would be difficult to make this not
compile?
No, except that might result in code breakage.
On Monday, 31 July 2023 at 10:55:44 UTC, Quirin Schroll wrote:
What am I missing here?
The duplicate definition check doesn't consider whether a
function is actually unambiguously callable (without e.g. traits
getOverloads), it only prevents creating the same linker symbol
multiple time. So
Apparently, functions can be overloaded solely distinguished by
attributes:
```d
void f(ref int x) pure { x = 1; }
void f(ref int x) { x = 2; static int s; ++s; }
```
I thought that, maybe, a `pure` context calls the `pure` function
and an impure context calls the impure function, but no:
On Monday, 27 November 2017 at 20:07:08 UTC, A Guy With a
Question wrote:
On Monday, 27 November 2017 at 19:41:03 UTC, Adam D. Ruppe
wrote:
On Monday, 27 November 2017 at 19:10:04 UTC, A Guy With a
One thing that is bugging me is having to mark up all of my
declarations with attributes.
Meh,
On Monday, 27 November 2017 at 19:41:03 UTC, Adam D. Ruppe wrote:
On Monday, 27 November 2017 at 19:10:04 UTC, A Guy With a
One thing that is bugging me is having to mark up all of my
declarations with attributes.
Meh, you could also just ignore the attribute crap. Only reason
I ever mess wit
On Monday, 27 November 2017 at 19:10:04 UTC, A Guy With a
One thing that is bugging me is having to mark up all of my
declarations with attributes.
Meh, you could also just ignore the attribute crap. Only reason I
ever mess with them is if someone who is using them tries to use
my code... oth
On Mon, Nov 27, 2017 at 07:10:04PM +, A Guy With a Question via
Digitalmars-d-learn wrote:
> Hi again!
>
> I've been trying to do my best to write idiomatically. One thing that
> is bugging me is having to mark up all of my declarations with
> attributes. Which means I'm having to remember t
On 11/27/17 2:10 PM, A Guy With a Question wrote:
Hi again!
I've been trying to do my best to write idiomatically. One thing that is
bugging me is having to mark up all of my declarations with attributes.
Which means I'm having to remember them all. It's a bit much to keep in
my head with eve
Hi again!
I've been trying to do my best to write idiomatically. One thing
that is bugging me is having to mark up all of my declarations
with attributes. Which means I'm having to remember them all.
It's a bit much to keep in my head with every function. Is there
a good way to reverse this (
12 matches
Mail list logo