On 4/11/25 17:39, Duncan Murdoch wrote:
On a tangent from the main topic of this thread: sometimes
(especially to non-experts) it's not obvious whether a variable is
protected or not.
I don't think there's any easy way to determine that, but perhaps
there should be. Would it be possible to
That might help, but protecting things is a fairly cheap operation, so I
don't know if people would bother with the naming convention. It's just
as easy to just protect things if you're not sure.
One way things can go wrong is when you think you protected something,
but then the pointer chang
On 4/11/25 16:23, Suharto Anggono Suharto Anggono via R-devel wrote:
Alternative revision:
Added to my changed 'StringFromLogical':
#define CACHE 16
if (!(*warn & CACHE)) {TrueCh = FalseCh = NULL; *warn |= CACHE;}
No change to 'coerceToString' and 'coerceToSymbol'.
--
On Friday
For a long-term horizon, would it help R developers to use a naming
convention?
Perhaps, varName_PROT, or the inverse varName_UNPROT?
Eventually, teach some linter about that?
On Fri, Apr 11, 2025 at 10:40 AM Duncan Murdoch
wrote:
> On a tangent from the main topic of this thread: sometimes (es
On a tangent from the main topic of this thread: sometimes (especially
to non-experts) it's not obvious whether a variable is protected or not.
I don't think there's any easy way to determine that, but perhaps there
should be. Would it be possible to add a run-time test you could call
in C c
Alternative revision:
Added to my changed 'StringFromLogical':
#define CACHE 16
if (!(*warn & CACHE)) {TrueCh = FalseCh = NULL; *warn |= CACHE;}
No change to 'coerceToString' and 'coerceToSymbol'.
--
On Friday, 11 April 2025 at 08:02:58 pm GMT+7, Suharto Anggono Suharto Anggono
wr
Oh, with the abuse of 'warn' in my previous message, warning would be issued
if the input 'v' of 'coerceToString' is a logical vector of length 1.
Revision:
Added to my changed 'StringFromLogical':
if (*warn) {TrueCh = FalseCh = NULL; *warn = 0;}
'coerceToString': insert
if (i == 0) warn = 1;
On second thought, I wonder if the caching in my changed 'StringFromLogical'
in my previous message is safe. While 'ans' in the C function 'coerceToString'
is protected, its element is also protected. If the object corresponding to
'ans' is then no longer protected, is it possible for the cache
The build system rolled up R-4.5.0.tar.gz and .xz (codename "How About a
Twenty-Six") this morning.
This is a major release with a number of new features, API changes, and bug
fixes.
The list below details the changes in this release.
You can get the source code from
https://cran.r-project.o