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 | 8344 reads
|
Browse archives
Active forum topics |
Recent comments
16 weeks 3 days ago
16 weeks 4 days ago
16 weeks 4 days ago
38 weeks 5 days ago
43 weeks 6 hours ago
44 weeks 4 days ago
44 weeks 4 days ago
47 weeks 2 days ago
51 weeks 6 days ago
51 weeks 6 days ago