Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's a math culture thing. Names barely matter, relationships do. All math since junior high is about f(x), not function_of(variable_entity).

It's very disturbing from the application Dev world view where people seek longer names for reasons, but after spending time in FP/LP and math you quickly forget long names. You seek variable count reduction most the time also.



This comment hits the nail on the head - if you think in terms of expressions and subsequently, expression substitution; there sometimes /is/ no good name for something.

This is /especially/ true for abstract code - functions like identity, const, map.


I understand where you're coming from. The problem is when using multiple generic Parameters, rustc outputs something like this:

`the trait 'Factory<_, _, _>' is not implemented for 'fn(Json<Auth>)' -> impl std::future::Future {auth}”.

What is this error saying? Can you tell? I certainly can't


I haven't programmed in Rust... but presumably it's just looking for an instance of that trait for that type?

It seems the type here is a function from JSON to a Future?

Given Factory means Factory, then, its saying there's no way to create an instance of that function?


Are you annoyed / confused because of <_,_,_> ?

It seems rust compiler team didn't write a proper error message or I cannot find meaning in this .. usually _ means 'whatever type' but <_,_,_> is useless if all types are the same whatever.


More accurately, math is about f:X->Y which is almost Haskell syntax




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: