Live data from Hacker News

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

news.ycombinator.com

11–20 of 182 posts

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

#13

Rust with Lisp syntax so I could actually write unhygienic macros without learning a bunch of arcane stuff about compiler internals.

Came here to say this. Rust is so great already, but with lisp syntax that would do it for me

By the way this already kind of exists. https://github.com/JunSuzukiJapan/macro-lisp Lisp syntax that translates to real rust at compile time. I love rust!

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

#14
Since I'm not doing lowlevel stuff, for me it would be a statically typed language that has a typesystem so powerful that it never gets in my way and lets me express all constraints in types that I need for my domain (so it must be a value-dependent typesystem or similiar). In addition, the syntax must be terse so that it's easy to define (business) datatypes and mappings easily, so that someone can come in and read those definitions quickly and understand the domain.

And then one feature that I like which few languages support are some kind of contexts. Scala does this really well for example, but even in Scala it could be improved.

What I mean is that code that looks the same can mean different things in different contexts. The typesystem then ensures that it cannot be used wrongly though.

An example would be how "5 ± 3" can mean different things depending on the context, such as "1 or 8" or "mean of 5 with variance of 3" (in statistics).

Without such a feature it's hard to translate thoughts into code as easy in certain domains.

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

#19
post #5

I've actually been having a lot of fun building stuff using OpenAI Codex. I suppose something where I could write the specs and the AI spits out something resembling HTML/JS/CSS so that I can verify that I communicated correctly. - create a dark mode palette for the page based on this image: {file path} - make a form with a single name (not first and last), email, country code, phone -- this form should allow a docum…

JSFiddle of this in 15 mins, with all the bugs included: https://jsfiddle.net/bmy7xzd6/1/

I guess the "perfect" language would have far less bugs.

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

#20
post #18

Rust with lisp syntax. Like what this macro does https://github.com/JunSuzukiJapan/macro-lisp Wait maybe what I want already exists

Here's a pretty cool macro that lets you use lisp syntax in rust:

https://github.com/JunSuzukiJapan/macro-lisp

Post reply on HN