Live data from Hacker News

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

news.ycombinator.com

21–30 of 182 posts

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

#22
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 functional interface. The details of what exactly that would look like in a way that integrated nicely would be important. I'd also want to be able to easily move code to the GPU or incrementally vectorize it.

I'd also like to see the one language / runtime support everything from C++ constexpr style compile time programming through native compilation, JIT runtime and an interpreted mode for scripting with it being easy to interoperate between levels and reuse the same code across contexts.

A good ecosystem of tools and libraries with a sane package manager and build system would also be important. F# is decent there but could still use improvement.

I'd also like to see less impedance mismatch between serialization and runtime data structures and with database / relational data. Hoon is pretty interesting in how there is no real distinction between runtime and serialized data in many contexts but its harder to see how to do something like that and meet the other goals above.

Much of the above is driven by the needs of games and VR. I'm interested to see what comes out of Simon Peyton Jones working at Epic as it seems it may lead to something along these lines.

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

#23

Typescript without the CJS/ESM/tooling BS. Plus a JIT compiler for performance.

TypeScript free from the historical baggage of JavaScript. With some runtime type checking, autogenerated typeguards from types, allowing things like checked de/serialization.

A TypeScript where (for example) string methods make sense, with all the number types and not just floats, with only null or only undefined and a lot of other things I can't think of right now.

Maybe add some pattern matching on top.

TypeScript's type system is so nice and ergonomic to use, it's a shame the basic objects of JavaScript (Object & co) are so "fickle" to work with.

To answer OP's question, I don't think there could be a "perfect" programming language.

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

#27
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 appears to be dropping mutation, severely limiting I/O and coming up with a domain independent scheduler for the runtime. So it's expensive but not impossible.

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

#30
post #11
post #7

Ruby with python style type hints

What is your thoughts on Crystal?

Looks awesome. Haven’t had an opportunity to work with it yet but plan to.

I wish they had considered Ruby interop from inception. I am sure it's a really, really hard problem, but it would have/could have done wonders for Crystal's adoption to be able to tap into the wealth of Ruby's existing ecosystem while layering types directly in the language.

Post reply on HN