Ionide-vscode-fsharp: Inline generic parameters in tooltips

Created on 23 Dec 2017  路  9Comments  路  Source: ionide/ionide-vscode-fsharp

image
image

It'd be much more readable if the generic parameters concrete types were just inlined into the signature itself, like C# editors do. I.e. the above signature should look like this:

image

Or maybe something like Flow<'t: int, 'u: int, 'mat: obj> would be even better.

wontfix

Most helpful comment

By text replace

All 9 comments

I would imagine that we would keep the argument names though (in your sample screenshot they appear to have been removed)?

We can do this.

@isaacabraham yes, the latter screenshot is real :)

I do think that Flow<'t: int, 'u: int, 'mat: obj> is the best approach.

@Krzysztof-Cieslak how are you gonna do this (don't tell me by text replace :)?

By text replace

:)

@vasily-kirichenko What I meant was, I'd like to keep the argument names rather than just the types. But yes, showing concrete types is nice.

i 馃憥 this. a lot.

while is nice in c#, in f# ihmo is bad

  • type def can become really really long. just one nested generic and become really bad
  • lot of repetition
  • doesnt with the generic signature, if reusing same type for multiple generic args in that instance
  • layour is easier with current 't and 't: int below

This is probably an artifact of inference anyway, the flow function, if polymorphic, accepts arbitrary types, its probably clearer is they are not made rigid in the function definition.

I think I like current state of the tooltips, and this would have some disadvantages as mentioned by @enricosada

Was this page helpful?
0 / 5 - 0 ratings

Related issues

isaacabraham picture isaacabraham  路  4Comments

yuhr picture yuhr  路  3Comments

MikaelUmaN picture MikaelUmaN  路  5Comments

dustinmoris picture dustinmoris  路  3Comments

lilred picture lilred  路  6Comments