TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: What features would your ideal programming language have?

11 pointsby msvanabout 5 years ago

9 comments

unlinked_dllabout 5 years ago
I&#x27;m really intrigued by Jai because it has many of the ideas I want to see in more languages and has pretty killer syntax. The concept of a meta program that Jonathon Blow talked about on the &quot;On the Metal&quot; podcast is wild.<p>A macro syntax that was both expressive&#x2F;hygienic, but allowed for better integration with tooling (frequently tools have no introspection into expanded macro code, and debugging macros almost always sucks). I&#x27;m not sure how to solve this problem however, but I think procedural macros in Rust are a decent enough start (debugging them sucks right now, but I see no reason why that has to be the case).<p>Along the same lines of the previous paragraphs (programming things around the program itself, like meta programming) is that the build process in most languages sucks, and requires using outside tools in different languages (be it a config file, make script, python&#x2F;shell scripting, etc). I&#x27;d really like it if I could write my entire build process in the language I&#x27;m building, including pre&#x2F;post build steps, specifying a dependency tree, etc.<p>An idea I love to work with is a purely declarative syntax, similar to configuration languages like TOML or JSON. But inside declarations you can write imperative code that synthesizes your declarative code programmatically. Now you can do this in JS today with some discipline, and make it kinda typed in Typescript. But if you have a fairly strict and limited type system and good error messaging&#x2F;debugging workflow it&#x27;s actually a fairly powerful concept. It helps deal with the oscillation in the industry between &quot;configuration is code&quot; and &quot;configuration is actually a bitch to write for complex systems.&quot; You can start with a pure configuration for your system, but then as complexity grows write imperative code that synthesizes the configuration.
评论 #22453339 未加载
photon_offabout 5 years ago
I would like to be able to delineate strings with any character(s) of my choosing. The default could be single or double or triple quotes, but don&#x27;t force me. I am sick of escaping characters in literals, I&#x27;d rather define a delineator that I know isn&#x27;t in the string. Same for templating.<p><pre><code> let name = &quot;Jane&quot;; let str = s{}:John said &quot;Don&#x27;t do that, {name}!&quot;:s </code></pre> I would also like a JSON-like shorthand for declaring nested structures, without having to define each individual component separately. Eg:<p><pre><code> struct Person { user: {string name, int age}, address: {string street, ...} } let p = new Person(&lt;json&gt;); print(p.user.age); </code></pre> Convenience with arrays (python slicing is nice), maps, and primitive types pay huge dividends.<p><pre><code> arr.first(); arr.last(); arr[5,-5]; &#x2F;&#x2F;5th to 5th to last </code></pre> Built-in arbitrary length&#x2F;precision numbers would be neat.<p>Besides that, tons and tons of useful libraries: IO, Date, JSON, DB Bindings, etc.
matijashabout 5 years ago
As some already mentioned below, in my opinion it would depend on the purpose of the language. In the case of the general language, these are some of my personal favourites:<p>- expressive type system<p>- easy &amp; intuitive to start with, but also powerful if needed (low floor, high ceiling)<p>- has a relatively small set of core concepts which are then composed together to build things further<p>- rich set of libraries (although pretty obvious and not really a feature)<p>I think our search for the &quot;grail&quot; general language will continue, probably forever. Languages such as Haskell, Rust &amp; Go (and probably a lot of others I haven&#x27;t heard of) are breaking the boundaries and introducing new concepts which then slowly spill over to more &quot;mainstream&quot; languages (e.g. the advent of functional programming constructs we are witnessing in Java, JS etc.).<p>Other than that, I also believe that more and more DSLs will start appearing, which is basically languages specialised for a specific purpose - which will make them extra convenient in their domain but not usable in the general case. Also, I expect the tooling (IDEs, build systems) to become more tightly integrated with the language, especially for the DSLs - creating the end product which at the end will be usable not only by the programming experts.<p>I have actually, together with my brother, been working on such an idea for the past year. We made a DSL for the domain of web apps - it is basically a declarative language that compiles to the stack of choice implemented in the general language (e.g. React&#x2F;Node). This makes it possible to express some web-app specific concepts with much less code, but is also constrained to that specific domain.<p>If anybody wants to take a look it is here: <a href="https:&#x2F;&#x2F;github.com&#x2F;wasp-lang&#x2F;wasp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;wasp-lang&#x2F;wasp</a><p>Would be interesting to see the results of your research and what majority thinks are the ideal language features.
zzo38computerabout 5 years ago
I think that different kind of programming languages can be suitable for different purposes, although I do have many ideas, anyways.<p>Some of them are:<p>- Macros (both hygienic and unhygienic)<p>- Bitwise manipulations<p>- Less confusing syntax for types than C has<p>- ASCII based (not Unicode, although you can write programs to work with data in any character set, including Unicode)<p>- Meta-programming<p>- Low-level features<p>- You have enough ropes to hang yourself, and also a few more just in case<p>- GOTO and GOSUB<p>- Direct dealing with the stack<p>- GADTs (without runtime support)<p>- Control over optimizations in different parts of the file<p>- Better namespacing<p>- Binary include files<p>I am sorry I did not write more elaboration of this. Also, I have more ideas too, but did not write them on here right now.
评论 #22452218 未加载
billconanabout 5 years ago
I want something like literate programming, documentation is enforced somehow. Or diagram can be translated into code and vice versa.
Hackbratenabout 5 years ago
First-class support for a version manager so that 20 years from now, I will be able to check out my project and build it immediately using the locked platform version.<p>A build system that makes it super easy to do the right thing with regard to locking dependency versions.<p>A compiler backend that generates reasonably small binaries.
marto1about 5 years ago
Most probably features that, in the end, contradict each other.<p>For example have all the nitty-gritty cool features for a low level programming language BUT also maintain Python-tier readability.
gshdgabout 5 years ago
Basically Python with better anonymous functions, no GIL, and a sane consensus solution to package management and running multiple versions of the language on one system.
partisanabout 5 years ago
Nim, but with a sane naming convention, less dependency on the underlying C language, and stability across versions.