News for hackers. Stuff that matters.
Re:Ask HN: What would your ideal programming language be like? by AnimalMuppet on Wednesday January 10, 2018 @07:27PM (#16120422)
I don't think you're going to design a great language that way. I think great languages get designed when you discover that with existing languages, it's difficult to do things that you want to do. If you don't know why you want to create a new language, it's not likely to scratch other peoples' itches either. (However, asking others for their pain points is a reasonable substitute.)

That said, here's an idea or two:

Optional garbage collection. In a C++ context, if I create an object with new, it's not garbage collected - it goes away when you delete it. But if you create it with some other mechanism (new2?), then it's garbage-collected when no longer referenced. (The problem with this idea is that a garbage-collectable object can still be "live" while referenced from a non-garbage-collectable object, which could be difficult.)

Adjustable need for typing. Personally, I love static typing. I want the compiler to tell me when I'm being stupid; I don't want to find out at runtime. But some people want to prototype/experiment/play with dynamic typing (or, if you prefer, without static types). So you can set a flag to the compiler to tell it not check static types. Then, as the code solidifies, you change the flag to make it a warning if there is not a defined type for a variable, or if a type is used incorrectly. But in this mode, it's just a warning - the code will still run (and crash or whatever when it hits the problem). Finally, for production builds, there's a flag for compiling with full static type checking.

Note that these are just ideas. They aren't my pain points. I'm pretty happy with a mix of C++, Java, and Perl.

There are no comments on this comment yet.