Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Consistent use of default = FluidDefaultAllocator() on algorithm constructors #244

Open
AlexHarker opened this issue Aug 16, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@AlexHarker
Copy link
Contributor

AlexHarker commented Aug 16, 2023

Is your feature request related to a problem? Please describe the problem.

Code is inconsistent in the use of = FluidDefaultAllocator() as a default argument on algorithm constructors

Describe the solution you'd like to see.

For the usage to be consistent. The advantage of no default argument is that it reduces the risk of accidental usage of the default allocator. The disadvantage is that it requires a specific choice for all uses of the algorithms.

If @weefuzzy can provide a preference the consistency could easily be ensured by others.

Describe alternatives you've considered

None (expcept that it stays as it is)

Additional context

That's quite enough context.

@AlexHarker AlexHarker added the enhancement New feature or request label Aug 16, 2023
@weefuzzy
Copy link
Member

Hmm, yeah. My basic position is that I dislike default arguments generally, and those were there primarily to minimize the leakiness of the commits as I added allocator stuff. When I remembered, obviously.

In favour of taking them out: clients (audio ones at least) should always be passing an allocator in – and one fine day someone might get round to making a better arrangement for Max / PD as well as SC. Downer, of course, is that this needs documenting.

The argument for keeping them in is an appeal to using the algorithms as a standalone API, and not having to worry about such things. I don't know that anyone's doing this yet, and I'm not convinced that a really clean simple algorithms API is simple to achieve alongside all the actual needs of the client code, without some additional wrapping at least.

So, I'm leaning towards purging them.

@AlexHarker
Copy link
Contributor Author

Cool - I will make this a task for those who have time for such tasks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants