Feature request: DTPRINT_VERBOSE

Open
#6,950 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, r
Domain
tooling

Research direction

Search the repository for DTPRINT and the existing verbose guards, then inspect how the macro is defined and used. Confirm that verbose output remains conditional and that existing non-verbose output is unchanged; run the relevant package checks after updating the usages.

Written by the indexing model from the issue text.

Description

internals

Right now, in many many cases, DTPRINT is enclosed by c if(verbose)

Simply adding the if statement to within the macro would make the intent clearer and eliminate many lines and extra text from the code.

This would be the macro:

#define DTPRINT     Rprintf
#define DTPRINT_VERBOSE(...) if(verbose) DTPRINT(__VA_ARGS__);

Even in cases where there are multiple DTPRINT statements in a single c if(verbose) block, the compiler will be smart enough to collapse them together.

This would also make non-verbose print statements stand out better.

Dominant language
R
Stars
3.9k
Forks
1.1k
Avg merge
14h 4m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Rdatatable/data.table

All issues in Rdatatable/data.table

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.