Function prototype: Difference between revisions
Content added Content deleted
(→{{header|PL/I}}: Added PureBasic) |
Thundergnat (talk | contribs) m (→{{header| Haskell }}: Fix header markup) |
||
Line 425: | Line 425: | ||
Otherwise, Go does have the concept of a function signature which includes parameters and return values. Go is strongly typed and functions are first class objects so function signatures are used in a variety of ways. These might be considered distinct from the concept of function prototype. |
Otherwise, Go does have the concept of a function signature which includes parameters and return values. Go is strongly typed and functions are first class objects so function signatures are used in a variety of ways. These might be considered distinct from the concept of function prototype. |
||
=={{header| |
=={{header|Haskell}}== |
||
A function can be declared without giving it's prototype in Haskell. The haskell compiler has got type inference |
A function can be declared without giving it's prototype in Haskell. The haskell compiler has got type inference |
||
whereby it can infer the return type and type of variable given to function. You can still hardcode the prototype |
whereby it can infer the return type and type of variable given to function. You can still hardcode the prototype |