Re:New in C# 10: Easier Lambda Expressions
by thomasz on Saturday November 27, 2021 @03:17AM
(#29358520)
Local inference is a gift sent from heaven, global inference not so much. Reading OCAML (and F#) is exhausting because you have to look into the implementation of each function (or into a separate interface file) to figure out how it's supposed to be called and what it is going to return.
[ Parent
| on HN ]
Re:New in C# 10: Easier Lambda Expressions
by pharmakom on Saturday November 27, 2021 @03:24AM
(#29358551)
My IDE puts annotations on every function and I can hover over values. Typing them out seems pointless with the right tooling.
Re:New in C# 10: Easier Lambda Expressions
by ahartmetz on Saturday November 27, 2021 @09:22PM
(#29365610)
You can hover one thing at a time, you can skim a page with your eyes very quickly. Making important information cumbersome to access is a terrible idea.
Re:New in C# 10: Easier Lambda Expressions
by TheMatten on Saturday November 27, 2021 @03:29AM
(#29358582)
One could argue that this is better covered by IDE/tooling showing you inferred types / suggestions.
Re:New in C# 10: Easier Lambda Expressions
by lamontcg on Saturday November 27, 2021 @01:06PM
(#29362057)
If the function is printed in a journal article, or you just use something like 'less' to look at the file all that information is not available.
I find it kind of weird that we've normalized not being able to read the code outside of the proper program for it. Since those IDEs often cost money it starts to feel a bit like steps towards a walled garden to me, and I'm not sure its good for actual computer science.
Re:New in C# 10: Easier Lambda Expressions
by pharmakom on Saturday November 27, 2021 @02:10PM
(#29362553)
I think development containers are a better way to deliver code with a paper.
Besides, the paper itself should optimise for clarity and global type inference languages allow type annotation where it might help. They simply let you skip type annotations which only add noise.
Re:New in C# 10: Easier Lambda Expressions
by brundolf on Saturday November 27, 2021 @04:19PM
(#29363651)
Not sure I'd say the IDEs "often cost money" these days
Re:New in C# 10: Easier Lambda Expressions
by lamontcg on Thursday December 02, 2021 @03:54PM
(#29422400)
Wait for VSCode Enterprise.
Re:New in C# 10: Easier Lambda Expressions
by ReleaseCandidat on Saturday November 27, 2021 @07:05AM
(#29359540)
That's what your IDE or LSP is for.
That's also the difference in 'philosophy' between OCaml, F# and Haskell. Haskell has the 'same' global type inference but the community sees them as (often only ;) documentation.