Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for "Any" type #375

Closed
ghaith opened this issue Nov 12, 2021 · 2 comments
Closed

Add support for "Any" type #375

ghaith opened this issue Nov 12, 2021 · 2 comments
Assignees

Comments

@ghaith
Copy link
Collaborator

ghaith commented Nov 12, 2021

Is your feature request related to a problem? Please describe.
The norm defines functions that can be used with any parameter, or return any parameter type.

Describe the solution you'd like
The norm defines ANY, ANY_NUM, ANY_BIT, ANY... as types that the other types derive from,
I suggest we use these names as guidance but we introduce a generic representation for these functions
e.g. REF<T: ANY>(in: T)
Deriving from ANY_NUMBER will make sure the T is either integer or float and so on.

Function calls for generic functions will be converted to a typed call
For example : a function with the signature ADD<T: ANY_NUMBER>(in1: T, in2: T) : T will look for a function of signature ADD__INT(in1: INT, in2: INT) : INT if in1 and in2 are passed as INT
The double underscore in the name ensures that the function is not a normal user-defined function.

@ghaith ghaith added this to the Standard function support milestone Nov 12, 2021
@ghaith ghaith self-assigned this Nov 14, 2021
@create-issue-branch
Copy link

Branch issue-375-Add_support_for_Any_type created!

@riederm
Copy link
Collaborator

riederm commented Dec 2, 2021

@ghaith i think this is done with today's merge of #380

@riederm riederm closed this as completed Dec 2, 2021
@ghaith ghaith moved this to Done in Next Jan 9, 2023
@ghaith ghaith added this to Next Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants