Re: Nice-to-have class methods

2016-01-28 Thread Tom Browder
On Wed, Jan 27, 2016 at 7:09 AM, Elizabeth Mattijsen wrote: >> On 27 Jan 2016, at 14:00, Tom Browder wrote: >> >> Given so many handy methods for built-in classes, it would be nice to have a >> couple of more for some, for instance: >> >> IO:Path.stemname

RE: Nice-to-have class methods

2016-01-28 Thread Paul Marquess
From: Tom Browder [mailto:tom.brow...@gmail.com] > > Given so many handy methods for built-in classes, it would be nice to have a > couple of more for some, for instance: > > IO:Path.stemname > Like basename except any suffix is removed > > IO::Handle.say (or println) > Like print

Re: Nice-to-have class methods

2016-01-27 Thread Tom Browder
On Wed, Jan 27, 2016 at 7:09 AM, Elizabeth Mattijsen wrote: >> On 27 Jan 2016, at 14:00, Tom Browder wrote: >> >> Given so many handy methods for built-in classes, it would be nice to have a >> couple of more for some, for instance: ... >> IO::Handle.say

Re: Nice-to-have class methods

2016-01-27 Thread Peter Pentchev
On Wed, Jan 27, 2016 at 02:14:17PM +, Philip Hazelden wrote: > On Wed, Jan 27, 2016 at 1:43 PM Peter Pentchev wrote: > > > On Wed, Jan 27, 2016 at 07:00:11AM -0600, Tom Browder wrote: > > > Given so many handy methods for built-in classes, it would be nice to > > have > > >

Re: Nice-to-have class methods

2016-01-27 Thread Elizabeth Mattijsen
> On 27 Jan 2016, at 14:00, Tom Browder wrote: > > Given so many handy methods for built-in classes, it would be nice to have a > couple of more for some, for instance: > > IO:Path.stemname > Like basename except any suffix is removed Seems like a nice idea. >

Re: Nice-to-have class methods

2016-01-27 Thread Peter Pentchev
On Wed, Jan 27, 2016 at 07:00:11AM -0600, Tom Browder wrote: > Given so many handy methods for built-in classes, it would be nice to have > a couple of more for some, for instance: > > IO:Path.stemname > Like basename except any suffix is removed Hmm, this sounds like a nice idea on a first

Re: Nice-to-have class methods

2016-01-27 Thread Brandon Allbery
On Wed, Jan 27, 2016 at 9:50 AM, Peter Pentchev wrote: > Right, so that would probably mean that you need a function that removes > the *last* extension; that might indeed make sense, although it's > trivial to implement as a regular expression substitution (but also beware >