Live data from Hacker News

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

news.ycombinator.com

171–180 of 182 posts

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

#171
post #9

Very abstract question, but the code is compiling, I'll bite right in. I think the 'ingredients' for my ideal language are more or less the following, in decreasing order of importance: - Quality of the ecosystem. You can't buy or engineer this, it kind of has to happen naturally. Good FFI and trying not to be a "let's rewrite the world" language help immensely. It's controversial to put this as the most important bu…

Interesting

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

#172

Good question! From the top of my head: non-opionated memory management, nice syntax (and meta-semantics), strongly statically typed, "interpreted with possibility of AOT compilation" execution model and easy and performant native interop. Let me expand the points in order. Non-opionated memory management means that I am in the ultimate control of each allocation it does. Even if it requires GC it should allow me to…

Hm, Im hearing a lot about REPL and GC

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

#173

I like to answer your post title and brainstorm at a bit higher plane (but it will have implications for the things, such as toolchains, that you highlighted). The germinating thought was remembering the frustration of having to choose between abstraction and performance . Sure, there are languages out there that do address this generally mutually exclusive dual to some degree of success. But there are other duals ou…

Ooh this is something Ive been pondering too. Perhaps a transformer model like GPT but focused primarily on language semantics and such. Especially the point about cognitive load - which I find to be quite undersaid

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

#174

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…

Having the "same syntax but in multiple different contexts" is a good idea in general I feel

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

#175

Something that takes PL theory concepts and puts them into practice: - dependent types - algebraic effects - linear types - algebraic data types - higher kinded types - homoiconicity (so it'd have to be Lisp-like, but typed) - borrow checking, and beyond, such as region borrow checking - cross-platform, JITed, as well as ahead of time compilation in release mode - static metaprogramming

A bunch of them already show up in languages like rust. Generics are the more ergnomic impl of HKTs and with ownership after you pass an entity it off to another context, you cant use it again, which I guess isnt exactly linear per se

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

#176

Ruby. To quote the creator Yukihiro Matsumoto: > I believe that the purpose of life is, at least in part, to be happy. Based on this belief, Ruby is designed to make programming not only easy but also fun. Writing Ruby code feels natural, from creating classes, all the way to its basic types. Knowing everything is an Object makes it easy to work with. The tooling is amazing as well, from managing gems through bundler…

Ruby is quite perfect for simpler, web based kinds of things from my experience. BUt one thing that always puts me off is that `start, do, end` syntax

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

#177

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

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

#178
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…

why google if the docs are great and the lang server/IDE actually shows good docs + examples on hover

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

#179

Something that takes PL theory concepts and puts them into practice: - dependent types - algebraic effects - linear types - algebraic data types - higher kinded types - homoiconicity (so it'd have to be Lisp-like, but typed) - borrow checking, and beyond, such as region borrow checking - cross-platform, JITed, as well as ahead of time compilation in release mode - static metaprogramming

A bunch of them already show up in languages like rust. Generics are the more ergnomic impl of HKTs and with ownership after you pass an entity it off to another context, you cant use it again, which I guess isnt exactly linear per se

Interesting. Given the comments from some others [0] when I asked about HKTs in Rust, they said something quite the opposite from you. Curious to hear your thoughts on those comments.

[0] https://news.ycombinator.com/item?id=32829806#32830146

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

#180
post #170

Earlier quoted context omitted.

Libraries exist: https://github.com/haxscramper/nimtraits https://github.com/andreaferretti/patty https://github.com/alaviss/union Again we are not new to this problem and already offer alternatives.

This is something that should be in the core language, not in a deprecated library

Mind explaining why algebraic types are better? than cased objects and why a limitation in the fields iterator, that prevents `==` to be automatically lifted, is connected to that?
Post reply on HN