Re: [julia-users] Re: Creating a show method for type alias

2015-08-16 Thread Ben Ward
I did debate doing this, but went with the typealias as, the way I understood it, CIGARString would be a variable containing a reference, to a vector or CIGARS. When in my mind, where a String is thought of as the array of chars, so it should be with CIGARString, it is the array of CIGARS. I

Re: [julia-users] Re: Creating a show method for type alias

2015-08-16 Thread Stefan Karpinski
The whole premise of an alias is that it's a different name for the same thing. On Aug 14, 2015, at 8:16 PM, Jeffrey Sarnoff jeffrey.sarn...@gmail.com wrote: Ben, much as I would like there to be a second kind of typealias, typealiased -- that let us work with the renanamings wiithout

[julia-users] Re: Creating a show method for type alias

2015-08-14 Thread Jeffrey Sarnoff
Ben, much as I would like there to be a second kind of typealias, *typealiased -- *that let us work with the renanamings wiithout risk to the objects of the type originally aliased -- this is not on the radar now. It is hard to peel off enough to form the CIGAR when the role of typealias is to

[julia-users] Re: Creating a show method for type alias

2015-08-14 Thread Ben Ward
Would that work? The variable to be printed isn't fed in as the second option? On Wednesday, August 12, 2015 at 1:34:16 AM UTC+1, colint...@gmail.com wrote: Does the following work? function Base.show(io::IO, ::Type{CIGARString}) #your code here end On Tuesday, 11 August 2015

[julia-users] Re: Creating a show method for type alias

2015-08-11 Thread colintbowers
Does the following work? function Base.show(io::IO, ::Type{CIGARString}) #your code here end On Tuesday, 11 August 2015 03:07:15 UTC+10, Ben Ward wrote: Hi, I have implemented a basic immutable type with a type alias for a vector of said type: immutable CIGAR OP::Operation