archives

misc suggestions

An insight that furthers programming is that ordinarily type systems do not directly affect the value of a computation. Generally type systems are used to restrict inappropriate operations. Spiting typing semantics from that of the base language enables greater expressiveness as well as control. Traditionally language standards are permissive. Compilers are written with extensions (that occasionally contradict the standard). Even specialists have decreasing benefit from increasing effort trying to improve a language. Substantial gain could be had by using a strict standard for a simple yet modifiable language. Modularity at the type interface is not only convenient for modification, but also reduces confusion.

One mechanism of fostering separation of concerns is attribution. A tag can simply be a specially named function which returns its first argument. The name can be recognized and action can be taken. Such a system is particularly good at reducing (and in some cases eliminating) unwanted behavior, increasing performance, and easing porting. These suggestions may relate to a specific context, so it may be appropriate for the compiler to ignore a hint. In another situation, a policy could be strictly enforced.

This design should benefit from a novel compiler architecture. Optimizations and analyses need to be engaged dynamically. For the cost of preserving some invariants the compiler implementation is more accessible to sophisticated algorithms. Balancing compile time optimization with run time scheduling is an area of active research. Separate compilation and dynamic linking of components raise the possibility that properties will be unresolved at compile time. An alternative to using dynamic checking is to provide a version with restricted use. If the constraints are matched, then the preferred target is linked. Multiple variations would provide graceful degradation. The capability of the linker is increased by including some of the functionality of the compiler.

Enabling or suppressing rules provides substantial flexibility. Even greater expressiveness can be obtained by using a meta-interpreter library. The compiler would recognize this library and try to compile the code directly rather than interpreting it. How well this would work would depend on how different the new language is. Considering the difference in effort writing an interpreter verses writing a optimizing compiler may make the occasional success worthwhile.

Using unlimited precision numbers as a primitive type makes them independent of a particular architecture. Performance would be poor without type casting. Since resolving latent types at compile time is an undecidable problem, manual intervention would be necessary. Semi automatic methods are worth investigation. Perhaps combining type inferenceing with profiling could show where a constraint is most needed.

It may be helpful to use multiple notations. Alternative syntax could be a basis for WYSIWYG editing as well. For example mathematical notation or GUI layout could be handy. Finding isomorphism between grammars is another undecidable problem. If our initial language uses a regular grammar, parsing algorithms can be used. A simple language is amenable to grammar coloring. Profiling, unresolved types, pointer analysis, etc. can be highlighted. Coloring can be transferred to alternate notations as well.

Some of these lines of inquiry may not be fruitful. (According to the strong Church-Turing Thesis) Computers will continue in importance to civilization. The means of developing this resource is thereby also important. The scientific establishment has forsaken studying this because of its marked lack of success. Programming language design is still worthy of investigation.