Ticket #248 (new defect)

Opened 3 years ago

Last modified 3 years ago

(Resolved) Namespace "reflect" for type meta-objects and their methods?

Reported by: lth Assigned to: lth
Type: defect Priority: trivial
Component: Spec Version: 4
Keywords: Cc: brendan,graydon,jeffdyer,dherman,cormac

Description

The proposal is to put the type meta-object interfaces (Type, NominalType, and friends) and their methods into a new built-in namespace called reflect, instead of having them in intrinsic, where they are now.

The typeOf function would similarly move.

The reasons are:

  • intrinsic should mean "early bindable, generally useful"
  • meta is reserved for hooks (and that seems like a good thing)
  • iterator is used for all the iteration stuff
  • uint32ops is used for uint operators
  • reflect is a good name for reflection
  • partitioning the methods means that we can have reflection methods on various kinds of objects without worrying about name clashes (eg, reflect::construct could in principle be a method on a class object, so class objects could implement ClassType? directly -- this is possible at present, but if so precludes adding an instrinsic::construct method to the class object for other purposes in the future)

Attachments

Change History

Changed 3 years ago by lth

  • summary changed from Namespace for type meta-objects and their methods to Namespace "reflect" for type meta-objects and their methods?

Changed 3 years ago by brendan

+1

/be

Changed 3 years ago by lth

  • priority changed from major to trivial
  • summary changed from Namespace "reflect" for type meta-objects and their methods? to (Resolved) Namespace "reflect" for type meta-objects and their methods?

By the power vested in me...

Note: See TracTickets for help on using tickets.