Live data from Hacker News

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

news.ycombinator.com

71–80 of 182 posts

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

#71

- One executable that is the runtime, accepting one argument: the source code file. - No linters. Code is auto-formatted. - No modules. Includes can be namespaced/aliased. - No package manager. Include by Git URL with tags. - No type annotations. Automatic type-checking. - No user-defined types. A few good types is better. - No null. Set membership with maps is better. - No exceptions. - No loops. List and map compre…

> No package manager. Include by Git URL with tags.

Go does exactly this (`go.mod`), and it turns out it still needs a package manager, just simpler. One of the reasons: diamond dependency problem.

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

#72

- One executable that is the runtime, accepting one argument: the source code file. - No linters. Code is auto-formatted. - No modules. Includes can be namespaced/aliased. - No package manager. Include by Git URL with tags. - No type annotations. Automatic type-checking. - No user-defined types. A few good types is better. - No null. Set membership with maps is better. - No exceptions. - No loops. List and map compre…

> No linters. Code is auto-formatted.

Naming: linters deal with much more than formatting, and users tend to create linters even for languages which enforce canonical formatting.

Linters check for the patterns which are allowed by the compiler, but disallowed by a particular project/team/org. Example: disallow functions longer than four statements, disallow repeated strings that could be replaced by a constant, etc.

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

#73

- One executable that is the runtime, accepting one argument: the source code file. - No linters. Code is auto-formatted. - No modules. Includes can be namespaced/aliased. - No package manager. Include by Git URL with tags. - No type annotations. Automatic type-checking. - No user-defined types. A few good types is better. - No null. Set membership with maps is better. - No exceptions. - No loops. List and map compre…

> - No user-defined types. A few good types is better.

> - No higher-order functions.

I'm not creative enough to understand how you can do anything useful without these 2. Can you clarify?

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

#74

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…

You comment made me think of Rayon, a rust module for upgrading any iterator into a concurrent iterator https://docs.rs/rayon/latest/rayon/iter/

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

#75
post #58

* Strongly, statically typed. * Good package management. * Good, easy to reason about build system. * Popular enough to find jobs with it. Probably a lot more, but I don't really remember my annoyances unless they're in front of me.

So basically Go?

They said "good package management" ;-)

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

#76

Aside from what's mentioned already: Longevity. Nothing is more frustrating than being forced to go through already working code just because some version update changed the syntax/semantic.

There will never be a Rust 2.0 for this reason. Perfect backwards compatibility is guaranteed forever. (New code can use new features using the "editions" system)

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

#78
Pretty much just Java but a few more affordances for flat memory layouts. I know value types are in the works and the new memory api is in preview so we're getting there.

Oh, and I think every language should come with an AST parser in python. We need to really lower the barrier to manipulating codebases with code. And before any one mentions Lisp, we know — and we'll never learn. Blub blub blub.

I'd like to be able to @Annotate a class with @Localized and enforce just that it'll never get assigned to a field or passed to public functions — only local variables and private functions. For anything mutable, it'll buy you 80% of what a borrower checker would.

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

#80
F# is the closest I've found. A pro/con of F# is the .NET ecosystem which has many C#-isms which both accelerate library development and detract from functional styles.

  - functional
  - type inference (but not so much to slow down compilation)
  - not too heavy on type abstraction
  - multi-threaded
  - local heaps for actors
  - cross-platform
I'm also disappointed that Pony doesn't have as wide adoption as Rust or Zig.
Post reply on HN