I think isbits() may be the function you’re looking for.
— John
On Aug 17, 2014, at 8:17 PM, vava...@uwaterloo.ca wrote:
> Tim,
>
> I suppose I could start writing the "readonly' package immediately, except
> two things seem to be missing: an abstract type that sits above sets (there
> is an
Tim,
I suppose I could start writing the "readonly' package immediately, except
two things seem to be missing: an abstract type that sits above sets (there
is an open discussion about this on github) and a function or macro that
tells whether a type is fully immutable (i.e., it is immutable and
So, what's stopping you from writing that package? Since much of the code in
Base (and in many packages) takes an AbstractArray input, you can protect any
array you care about by wrapping it in ReadOnlyArray, and (mostly) it should
Just Work. You don't need to convince anyone of anything.
Besid
Tamas Papp asks what problem would be solved by being able to specify which
function arguments are inargs. Here are three possible problems solved:
(1) To catch programmer blunders, e.g., which is the correct order of the
three matrices passed to 'matmul'.
(2) To make debugging easier. For e
At some point, I put some thinking into this.
In my ideal world this should be solved by a library, which supplies meta
informations for all known Julia functions.
With that you could recursively determine if a function actually intents to
alter some of its arguments.
Together with an IDE, you co