3 ms·
Ask HN: Why not programming language annotations to induce editor/IDE features?
Why don't programming languages contain standardized editor/IDE annotations to induce more sophisticated editor/IDE support (e.g., optional WYSIWYG table entry for tabular static data, etc.)?
For example:
let table:[[Int]] /{ tabular, 10x10, centered } = ...
Editors/IDEs supporting this annotation would give you a WYSIWYG table for entering and showing static data for this table.
Another example: induce editor/IDE visualization via unicode
enum Suit { case Heart/{unicode char}, Diamond/{unicode char}, Spade/︎{unicode char}, Club/︎{unicode char} }
let x = Suit.Heart
In an IDE/editor that supports visualization annotations, the following would be shown:
enum Suit { case Heart/{unicode char}, Diamond/{unicode char}, Spade/︎{unicode char}, Club/︎{unicode char} }
let x = Suit.{unicode char}
A linear algebra library might come with unicode visualizations to make code that uses it much nicer to look at.
Yet another example would be to induce tool support for "commit comments":
https://github.com/thebearjew/commit-comments
- sklogic 11y agoSee Wolfram Mathematica notebooks for example. Also, some literate programming tools are somewhat close.