Hacker News new | ask | show | jobs
by wool_gather 2693 days ago
> a language you can use from system programming tasks, up to high-level scripting through DSL

Swift has this same stated goal. I guess ambition is good, but I really don't understand why you would try to make one tool handle such wildly different use cases. It's like me saying "my handheld electric jigsaw can be used from ripping full plywood sheets, up to cabinetry through luthiery". Well, sure, it can...but it's not actually good at more than one or two of those things.

2 comments

Why do you think they are different use cases?

The electric jigsaw example seems to illustrate the contrary of what you think it does because as technology advances it actually does make it possible for a tool to cover more use cases effectively. E.g. example an electric jigsaw covers more use cases than a manual hacksaw.

It’s possible to imagine a miniature drone with a high powered cutting laser that is controlled via an AR/VR interface that would be able to do anything from felling trees to cutting your fingernails. Obviously we’re some way off having that technology today.

But by analogy, it seems like we’re in a much better position to make programming languages that cover a broader and broader set of use cases, because we aren’t so constrained by materials science.

Why would you make one programming language to handle all of these cases? Surely there’s an incredibly strong case for that:

1. It makes more use cases accessible with less cognitive load. That’s pretty much the reason we have programming languages at all.

2. Investments in tooling etc. are magnified.

Rust has hygienic macros which one can use to build EDSL's. It's not that hard.
No matter how hygenic the macros are, you'll still end up with the problem of a million different DSLs, five for each codebase. With partial-stack languages, different projects can share the same language for each level of the stack.