|
|
|
Ask HN: What's something you'd like that programming languages don't do?
|
|
7 points
by westicecoast32
2230 days ago
|
|
For example Andrei Alexandrescu likes how much you can do with static if in D however he thinks languages needs to have more powerful reflection. Jon blow wrote his language so he can both modify the AST during compile time and write compile time rules without writing a plugin I'd like more errors and warnings to be in a language, such as when I modify array [0] and [2] but not element [1] and extra warnings when I do strange things with a bunch of if's (hard to explain so I'll spare you). What are yours? |
|
Another thing I would like to have is better bitwise manipulation operations. I find the MOR instruction of MMIX is sometimes useful, and so is the ~ operation of INTERCAL. I also thought of a operator which can be like any one of the C operators + or | or ^ since it is assumed the result is the same in all cases (which will be the case if the bitwise AND of the left and right operands will be zero).
I also agree I want to modify the AST during compile time, using macros.
Many modern programming languages lack a GOTO command, but I think that imperative programming languages should have a GOTO command.
Something that I might want to have is something like LLVM with macros added, although LLVM is itself deficient in some ways (e.g. no support for decimal arithmetic, no support for overlapping data with instructions (e.g. reading/writing immediate operands of other instructions), some calling conventions are missing, and you can't make stable undefined values longer than one bit).
For GPU programming, I think to want something like Checkout.