Live data from Hacker News

Ask HN: What would be your “perfect” programming language?

news.ycombinator.com

31–40 of 182 posts

Re: Ask HN: What would be your “perfect” programming language?

#31

Syntax like F# but with the ability to get performance like C++. Linear types seem to offer some hope of being able to have manual / non GC memory management in a functional programming language but I haven't really seen this done in a mature functional language. To really get good performance you probably need the ability to drop down and write more procedural style code in hot code paths and expose it with a functi…

Have you tried Rust? It checks a great deal of your boxes, don't be misled by the reputation of a "systems programming language"! I made a video explaining why rust is different here, if you're interested https://youtu.be/4YU_r70yGjQ

Re: Ask HN: What would be your “perfect” programming language?

#33
A universally perfect language can't exist.

There are general purpose languages (say, java, go, rust, ts, and c -- one is better than another for specific tasks), and then there are HDLs, DSLs, constraint and SAT solvers, and many more I don't even know about.

Re: Ask HN: What would be your “perfect” programming language?

#34
TypeScript, but the only supported module system is ESM (including extension being required like it is in the browser), there is no interface and enum (types and type unions are used instead), there are nameof and typeof operators in the language and there is syntax for getting a runtime value representing a type (for example string union into a string array) or even straight up option/syntax to selectively (up until absolutely) enforce type shapes at runtime.

Re: Ask HN: What would be your “perfect” programming language?

#36
To me what matters the most isn't the language but the ecosystem:

- versatility: create desktop apps, mobile apps, websites, CLI

- quality of IDE / tooling

- lots of libraries to deal with all sort of corner problems

- lots of knowledge I can google

- if used professionally: lots of talents available

For the language itself, I only really care about one thing: statically typed, just because it eliminates all sort of silly bugs and makes refactoring and navigating the code so much easier. But I am not dealing with hard computer science problems.

But the most important thing is muscle memory: not having to even think of how to solve something, just do it. We can probably adapt to any major language, but you aren't productive until you develop muscle memory. That's why I am not looking to switch to any shiny new thing unless I have a really compelling reason to do so.

Re: Ask HN: What would be your “perfect” programming language?

#37

I want to write a program that has no mention of concurrency and runs efficiently on clusters anyway. So no threads, fibres, processes, actors, atomic, mutex, channels, queues, coroutines. Not in the language nor in a library. Push the concurrency and distribution machinery into the language runtime. Developer can neither see nor influence it. Program just runs faster when put on more parallel hardware. The price app…

NodeJS sounds pretty close to that. Just ‘await’ anything in parallel and your code appears synchronous. Parallel code would need to be a new node process, so it’s not quite so amazing, but pretty close.

Re: Ask HN: What would be your “perfect” programming language?

#39
// comments would be my perfect language, write good documentation And leave the coding mostly over to CoPilot, or another AI. Although one needs to understand coding, we should work at a higher level. If you cannot write a good CoPilot prompt, i wouldn't accept you as colleague, if you cannot describe code your unable to properly write your own thoughts, makes you a team disaster. The language itself thus becomes less relevant these days, and the years to come.

Re: Ask HN: What would be your “perfect” programming language?

#40
post #36

To me what matters the most isn't the language but the ecosystem: - versatility: create desktop apps, mobile apps, websites, CLI - quality of IDE / tooling - lots of libraries to deal with all sort of corner problems - lots of knowledge I can google - if used professionally: lots of talents available For the language itself, I only really care about one thing: statically typed, just because it eliminates all sort of…

- good quality standard library

- good developer tooling, e.g. a language server

- This is not yet possible, but a good optimiser which can turn an abstract representation of the code into optimal code for a given hardware (CPU or GPU). Currently we are far from this, there is probably a 10x improvement that current compilers can't achieve. See for example a FizzBuzz implementation achieving ~10x throughput improvement after months of optimisation work:

https://codegolf.stackexchange.com/questions/215216/high-thr...

More complex code is likely much more improvable.

Post reply on HN