You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec-draft.rst
+7-11Lines changed: 7 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,12 +153,12 @@ Methods are returned as callables using the new ``Param`` based extended callabl
153
153
154
154
TODO: What do we do about decorators in general, *at runtime*... This seems pretty cursed. We can probably sometimes evaluate them, if there are annotations at runtime.
155
155
156
-
We also have helpers for extracting those names; they are all definable in terms of ``GetArg``.
157
-
(These names are too long -- but we can't do ``Type``. I kind of want to do the *longer* ``MemberName``?)
156
+
We also have helpers for extracting those names; they are all definable in terms of ``GetArg``. (Some of them are shared with ``Param``, discussed below.)
157
+
(These names are too long -- but we can't do ``Type``.)
158
158
159
-
* ``GetName[T: Member]``
160
-
* ``GetType[T: Member]``
161
-
* ``GetQuals[T: Member]``
159
+
* ``GetName[T: Member | Param]``
160
+
* ``GetType[T: Member | Param]``
161
+
* ``GetQuals[T: Member | Param]``
162
162
* ``GetDefiner[T: Member]``
163
163
164
164
* ``NewProtocolWithBases[Bases, Ps: tuple[Member]]`` - A variant that allows specifying bases too. (UNIMPLEMENTED)
@@ -174,14 +174,10 @@ We also have helpers for extracting those names; they are all definable in terms
174
174
Callable inspection and creation
175
175
--------------------------------
176
176
177
-
* TODO: Should ``GetArg`` on a callable automatically convert ``[int, str]`` or whatever into something using ``Param``? Or should a separate operator be needed?
177
+
``Callable`` types always have their arguments exposed in the extended Callable format discussed above.
178
178
179
-
* ``GetParamName[T: Param]``
180
-
* ``GetParamType[T: Param]``
181
-
* ``GetParamQuals[T: Param]``
179
+
The names, type, and qualifiers share getter operations with ``Member``.
182
180
183
-
This is unsatisfying; maybe they all need to be just ``ParamName`` and also ``MemberName`` above.
184
-
We could also merge the getters for ``Param`` and ``Member``.
0 commit comments