General

Profile

trans (Thomas Sawyer)

  • Login: trans
  • Registered on: 09/07/2008
  • Last sign in: 12/12/2016

Issues

open closed Total
Assigned issues 0 1 1
Reported issues 21 90 111

Activity

10/11/2016

06:36 PM Ruby Feature #9704: Refinements as files instead of modules
Shugo Maeda wrote:
> Monkey-patching style has another problem that super cannot be supported in monkey patching.
> ...
That last line just clicked with me, and I see old problem. This only works at one level. How would one write a ref...
trans (Thomas Sawyer)
06:15 PM Ruby Feature #12775: Random subset of array
This definition of `#sample` seems a bit limited. I know it aligns with the statical definition but it is very easy do another way: `shuffle.take(n)`. Also, the interface is a little odd because it can return an element or an Array. Mayb... trans (Thomas Sawyer)

08/03/2016

04:54 AM Ruby Feature #9704: Refinements as files instead of modules
Has any more thought been given to this? I had a recent request to have Ruby Facets to work as refinements, but I hesitate b/c it literally means creating a second copy of every extension method.
trans (Thomas Sawyer)
04:07 AM Ruby Feature #12374: SingletonClass
So...
~~~
Object..singleton_class.instance_of?(SingletonClass) #=> true
~~~
trans (Thomas Sawyer)
03:55 AM Ruby Feature #12637: Unified and consistent method naming for safe and dangerous methods
It would more interesting if there were a way to declare an object mutable or not, then when immutable destructive methods would not be available. trans (Thomas Sawyer)

05/09/2016

03:23 PM Ruby Feature #12360 (Rejected): More useful return values from bang methods
It would be nice if bang methods returned results that where of some additional use. Presently most just return the effected receiver.
For example, currently Array#reject! works as follows:
a = [1,2,3,4]
a.reject!{ |x| x %...
trans (Thomas Sawyer)

11/04/2015

12:07 AM Ruby Feature #11537: Introduce "Safe navigation operator"
Philip Claren wrote:
> Thomas Sawyer wrote:
> ...
Is allowing false necessary/useful? On the other hand, if it is, then might a nil-only ternary operator be useful too (regardless of this issue)?
trans (Thomas Sawyer)
12:01 AM Ruby Feature #11537: Introduce "Safe navigation operator"
Laurentiu Macovei wrote:
> The same discussion happens to be on TypeScript and ES6 worlds.
> ...
`..` wouldn't work. But that reminds me. Was `!` ever considered?
u!profile!thumbnails!large
trans (Thomas Sawyer)

10/26/2015

05:10 AM Ruby Feature #11537: Introduce "Safe navigation operator"
Yukihiro Matsumoto wrote:
> I like the idea. My remaining concern is ".?" is too similar to "?." which is chosen by other languages.
> ...
Maybe there is a better syntax by requiring a space:

u ? .profile ? .thumbnails ? .larg...
trans (Thomas Sawyer)

03/11/2015

06:49 PM Ruby Bug #10924: String#b
That's the irony. One of the reasons I choose #b is because I thought for sure that would almost certainly never become a conflict in the future. I would expect #base to be a much more likely vector for clashing.
Giving this more thou...
trans (Thomas Sawyer)

Also available in: Atom