Live data from Hacker News

Ask HN: What's something you'd like that programming languages don't do?

news.ycombinator.com

1–10 of 13 posts

Ask HN: What's something you'd like that programming languages don't do?

#1
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?

Re: Ask HN: What's something you'd like that programming languages don't do?

#3

I'd like a compiled language that feed optimization strategy notes to the editor, so the editor can describe to the programmer what the compiler plans to do to optimize features of your code.

That's a really good idea. That's what I use compiler explorer for but I do it poorly. CC: llvm

Re: Ask HN: What's something you'd like that programming languages don't do?

#5
Tooling in mind, and assume that the language is not the only language in existence. A large part of my career has been spent writing scripts to duct tape together tools from different languages or write custom tools to deal with friction in a development environment.

Re: Ask HN: What's something you'd like that programming languages don't do?

#6
I wish I could code in Python and compile down to run natively like C, or even Go. The more I've used the language, the more it just feels natural, but it's so limited in A.)native compilation and distribution, and B.)multithreading/processing just sucks so bad.

Re: Ask HN: What's something you'd like that programming languages don't do?

#7
post #4

I'd like a language that allows me to explicitly annotate my code for vectorization/SIMD. Too often compilers aren't able to vectorize efficiently because the heuristics don't detect the opportunity.

I had a thought on this but it's alot of work for one person and IDK if anyone would use my language for that.

I agree tho. I been learning SIMD and the operations it supports are pretty neat

Re: Ask HN: What's something you'd like that programming languages don't do?

#8
post #5

Tooling in mind, and assume that the language is not the only language in existence. A large part of my career has been spent writing scripts to duct tape together tools from different languages or write custom tools to deal with friction in a development environment.

Could you get a little more into this? I never had to do anything like that since all my workplaces only used 1 language + js

Re: Ask HN: What's something you'd like that programming languages don't do?

#9
1. Delayed function argument expression evaluation. Only evaluate the argument if the result is consumed.

You can get close using Callable/.call in Java or better with 'lazy' in Kotlin, but I want it to be default behaviour. Even 'let' in Lisp/Clojure is sometimes annoying being eagerly evaluated.

2. 'var' function argument and return types. Basically allow type inference to work through a call stack.

Basically I want F# features to be in more popular languages.

Re: Ask HN: What's something you'd like that programming languages don't do?

#10
Algebraic effects is very interesting to me.

A try...catch block allows one to define how an exception is handled within a given block. You can take the same function, and wrap it in a different try...catch block, and have the exception handled in a different manner.

Algebraic effects would allow one to define how a side effect (e.g. database queries, logging, etc) is performed within a given block. You can take the same function, wrap it in a different block, and have its side effects handled differently. You could have Logging effects write out to stdout in tests, and write to Splunk in production code, for example.

This would give a nice language-level, type-safe construct for implementing dependency injection, without the usual kludges of traditional DI frameworks.

Post reply on HN