User loginNavigation |
Code Completion for Generic ProgrammingI want generics, in particular polymorphic functions as well as function overloading based on type-classes. For the moment think about Haskell type-classes and C++ Concepts. I also want code completion. Code completion works for OO languages because they are polymorphic on the object type, which prefixes the function call, and hence the type is known when code completion lookup occurs. Generic functions can be polymorphic on any argument. This suggests that all the arguments need to go before the operator in postfix format. This way code completion can operate on the argument types, and only offer valid generic functions. It can also offer all generic functions that take those arguments in alphabetic order. I want to discuss whether this idea has any merit, and second I want to discuss syntax: So, a reverse lisp style (likely to confuse people as no clear difference from lisp function first format): (list comparator sort) or perhaps reverse C: (list, comparator) sort Or perhaps a template C++ like syntax: <list,comparator>.sort Or: list,comparator.sort By Keean Schupke at 2014-11-18 11:32 | LtU Forum | previous forum topic | next forum topic | other blogs | 8369 reads
|
Browse archives
Active forum topics |
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 16 hours ago
49 weeks 2 days ago
50 weeks 6 days ago
50 weeks 6 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago