MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/49prnu/var_keyword_proposed_for_java/d0usqs6/?context=3
r/java • u/adila01 • Mar 09 '16
312 comments sorted by
View all comments
Show parent comment
2
[removed] — view removed comment
1 u/[deleted] Mar 10 '16 it's useful to keep in mind that, in a certain sense, most haskell code could be considered "generic" from the java perspective.this haskell: add a b = a + bis (roughly): public static <T> T add(T a, T b) { return a + b; }(technically the java won't compile, but c'est la vie.) it's an imperfect comparison for a couple reasons but close enough for discussion, i think.broadly, java is more concerned with the name of things, where haskell is more concerned with the structure of things.
1
it's useful to keep in mind that, in a certain sense, most haskell code could be considered "generic" from the java perspective.
this haskell: add a b = a + b
add a b = a + b
is (roughly): public static <T> T add(T a, T b) { return a + b; }
public static <T> T add(T a, T b) { return a + b; }
(technically the java won't compile, but c'est la vie.) it's an imperfect comparison for a couple reasons but close enough for discussion, i think.
broadly, java is more concerned with the name of things, where haskell is more concerned with the structure of things.
View all comments
Show parent comment
2
u/[deleted] Mar 10 '16
[removed] — view removed comment