synopsis for classes #1776

Open
bjourne opened this Issue Jan 8, 2017 · 4 comments

Projects

None yet

2 participants

@bjourne
Member
bjourne commented Jan 8, 2017
\ dup synopsis print
IN: kernel PRIMITIVE: dup ( x -- x x )

That looks very nice

\ http-server synopsis print
IN: http.server SYMBOL: http-server
\ integer synopsis print
IN: math SYMBOL: integer

Not so nice. It should read IN: http.server TUPLE: http-server < threaded-server and IN: math UNION: integer fixnum bignum instead.

@mrjbq7
Member
mrjbq7 commented Jan 8, 2017

I'm not sure , isn't that used for one line display of stuff at the bottom of the listener when you mouse over? Class descriptions might be longer than one line?

@mrjbq7
Member
mrjbq7 commented Jan 8, 2017

Maybe a shortened description but I can imagine sequence would be long if you printed more than just MIXIN: sequence and if you printed a class and it's slots definitely no space for their types or slot attributes?

It's a good idea to do something better, though.

@mrjbq7
Member
mrjbq7 commented Jan 9, 2017

Also, ALIAS: foo bar doesn't print the word it is aliased too (just its stack effect):

IN: scratchpad ALIAS: foo ( x y -- z )
@bjourne
Member
bjourne commented Jan 10, 2017

I didn't think about long definitions. Perhaps they can be ellipsized so \ sequence synopsis would print:

 IN: sequences MIXIN: sequence INSTANCE: INSTANCE: immutable-sequence seq...

Or just IN: sequences MIXIN: sequence. It would be an improvement of what we have now imho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment