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
However, pointers are declared with the * adorning the type and not the identifier:
int*ident;
For pointers, this means that the type-cast associated with the type declaration is symmetric, but the same is not true for arrays:
(int* )something; // looks just like `int * something;`
(int [] )something; // does not look like `int something [];`
Java—perhaps the only syntactical addition Java made that I like—added the ability for the [] to be specified immediately following the type:
int [] something;
Supporting both syntaxes allows people to choose whichever they find to be most expressive and helpful for the circumstance. It also might make hash declarations much clearer (imho):
int {string} some_hash;
The text was updated successfully, but these errors were encountered:
In C, arrays must be defined like so:
However, pointers are declared with the
*
adorning the type and not the identifier:For pointers, this means that the type-cast associated with the type declaration is symmetric, but the same is not true for arrays:
Java—perhaps the only syntactical addition Java made that I like—added the ability for the
[]
to be specified immediately following the type:Supporting both syntaxes allows people to choose whichever they find to be most expressive and helpful for the circumstance. It also might make hash declarations much clearer (imho):
The text was updated successfully, but these errors were encountered: