r-lib / R6

Encapsulated object-oriented programming for R
https://R6.r-lib.org
Other
405 stars 56 forks source link

Default print method could be improved #127

Open hadley opened 7 years ago

hadley commented 7 years ago
<Person>
  Public:
    age: 37
    clone: function (deep = FALSE)
    initialize: function (name, age = NA)
    name: Hadley

# ->

<Person>
Public:
  age:        37
  clone:      function(deep = FALSE) {}
  initialize: function(name, age = NA) {}
  name:       Hadley

We could colour the field names, using the same approach as in glue (i.e. suggest crayon and only use if available)