Re: [julia-users] Re: Proposal for inargs

2014-08-17 Thread John Myles White
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

[julia-users] Re: Proposal for inargs

2014-08-17 Thread vavasis
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

Re: [julia-users] Re: Proposal for inargs

2014-08-15 Thread Tim Holy
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

[julia-users] Re: Proposal for inargs

2014-08-15 Thread vavasis
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

[julia-users] Re: Proposal for inargs

2014-08-14 Thread Simon Danisch
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