6 ms·
The programming language I want has: * the philosophy of zig in terms of simplicity * the thread and memory safe nature of Rust - without Rust's kitchen sink
by andrewstuart 3y ago
The programming language I want has:
* the philosophy of zig in terms of simplicity
* the thread and memory safe nature of Rust - without Rust's kitchen sink approach to adding sub languages and complexity
* the simplicity and straightforwardness of TypeScript
- 38 3y agoI dont think this really exists. Zig does have some memory safety, but not as much as Rust of course. I think Zig made the decision to add as much safety as they could, without crossing the complexity boundary. any further memory safety and you're about in Rust land. maybe some middle ground language is possible, but not one that I know of.
- Tozen 3y ago> any further memory safety and you're about in Rust land... That's not quite true. We have GC using languages (some allow it to be turned off), and for many or in many use cases, that would be enough. Other languages like Lobster, Vlang, Vale, etc... are developing/putting out easier to use alternatives.
- scns 3y agoYou are both right it seems. GP seems to have omitted withour GC. Number one on your list could be Dlang no? Not affiliated. https://dlang.org/ https://dlang.org/
- rockwotj 3y agoGolang?
- 38 3y agoGC
- Tozen 3y agoBut Golang's GC is tweakable. As a compiled language using a GC, it and others aren't that slow. Often fast enough, for many use cases.
- jayd16 3y agoIf they literally mean safety then perhaps Golang fits the bill but they said safety _like Rust_. They probably still want the control that Rust provides.
- rockwotj 3y agoHonestly simplicity and having syntax to teach a compiler how to reason about all the lifetimes you need in a real program are at odds. I love rust but I think it's fundamentally complex
- vacuity 3y agoFor sure, and I think different people may understate or overstate its complexity. It's definitely worse than Go but it's not nearly a field of landmines like C++. I think it's quite feasible to learn the basics in a short period of time, but maybe that's just me. I guess we'll see how Vale and the others turn out in production.
- satvikpendem 3y agoHave you seen Vale? They're working on a new type of analyzer for memory errors, that apparently is simply and safer than Rust's [0]. [0] https://verdagon.dev/blog/first-regions-prototype https://verdagon.dev/blog/first-regions-prototype
- fwsgonzo 3y agoFor me, Vale would need to be able to produce static executables the way Go does, without pulling in a kitchen sink of DNS and curl+dependencies type of libraries.
- skribanto 3y agoAustral has been looking good to me as a potential "rust-lite". It's still in the very early stages though.
- nine_k 3y agoIf instead of Rust you'd take its close enough relative, OCaml, but without the GC and with more low-level machine access, maybe ATS would fit your bill. https://en.wikipedia.org/wiki/ATS_%28programming_language%29 https://en.wikipedia.org/wiki/ATS_%28programming_language%29 To my mind, BTW, Typescript is not that "straightforward" or "simple", but it has a pretty powerful type system, and I like that.
- bachback 3y agothanks for this, is there a way to get a good overview over more exotic languages?
- andrewstuart 3y agoWhen I look at Ocaml source code I feel like I’m reading mirror language.
- hot_gril 3y agoThe high-level language I want is JS. For mid-level, something like C++ but with Rust's automatic typing and way fewer unnecessary features.
- danpalmer 3y agoJavaScript, really? I get the practical reasons why it’s useful, but I’m surprised it’s anyone’s choice for the design of a high level language. Is Python or Ruby not a much better choice?
- hot_gril 3y agoPython's biggest inherent issue is it lacked async syntax for a long time. Haven't used the newer versions that have it, so idk how well it works. JS also has a way better package system and nicer syntax for objects and lambdas. Then the more practical issue is all the UI stuff integrates with JS rather than Py, and Py is even slower than JS. Ruby, idk, never used or even encountered it. Python was my main language for a while.
- danpalmer 3y agoThe syntax points are fair, but the lack of standard library in JS complicates so many things. I'd contest the idea that the JS package ecosystem is better – there is more tooling, but I'm not sure the tooling is better, and the average package quality is easily the lowest in any ecosystem I've worked in. I could see fully modern JS, without any transpilers, being an ok scripting language, I guess that's why React Native works well in that way.
- hot_gril 3y agoSeems like Python projects (e.g. the top Py-based Github repos) always have Dockerfiles because they know pip+venv or whatever is notoriously finicky, whereas JS projects will rely safely on npm which is quite portable. After fighting with my Python packages for so long, JS was refreshingly easy. For standard library, NodeJS keeps things pretty simple server-side. It's messier client-side with browser standards, but it's getting better, and Python can't even run in-browser. I like how JS evolves more gradually than Py which had the hard 2->3 transition.
- ukuina 3y ago>> the simplicity and straightforwardness of TypeScript This is a bit of a headscratcher. TS is a kludgy attempt at adding type safety to a dynamically-typed and expressive language.
- andrewstuart 3y agoHave you done much Ts programming? It’s SO easy. All programming languages should be this easy.
- alpaca128 3y agoEasy != simple. I find it baffling how on one hand you like TypeScript for its "simplicity" while asking for a language with "the philosophy of zig in terms of simplicity". TypeScript has more than enough complexity even without the npm ecosystem.
- ilrwbwrkhv 3y agoTypescript is not only not easy. It is also slow and ugly. The 2 cardinal sins of a programming language.
- lproven 3y ago[[Insert off-by-one error joke here]]