Skimmed through the docs. On the first look, the syntax seems to be a blend of Go and Rust.
Was confused by this sentence [0], perhaps some additional explanation/code example could help:
When a value has ownership, it can be stored and used anywhere. But you can only store it in one place.
Aside from that, I'd really like to know about1) concurrency support
2) memory management techniques
As those are the most interesting aspects of any C-like language to me.
Good luck!
Python, Racket and a few others do this really well. Even on the GitHub a simple short but significant enough code snippet would do wonders.
Maybe the syntax is exactly what I expect and I'll have more interest, or maybe its way off and I don't want to bother. Whatever the case, put some sample code up front and center.
https://ki-lang.dev/docs/dev/intro
For a more indept view of the language you will have to see the docs. An overview might not be bad indeed.
Using the readme as a landing page kitchensink is a GitHubism.
public MyClass Students { get; set; }
You will need to create a new object before you leave the class or you will get an error. Or, you can use MyClass? instead, and it will give warnings any time you try to use Students without checking for null first. This is done before compiling so you can check for these null references through the IDE. This is a big change for C# and can effectively eliminate null references (object reference not set to an instance of an object) exceptions throughout your application.
You can do some gymnastics like various types of deferrals to amortise the cost, but now you're getting into more sophisticated tracing-like runtime behaviour which has it's own unpredictability.
There's no free lunch. Better static analysis that can aggregate various allocation into arenas/regions seems like the only way to make this trade-off better.
PL circles: reference counting is also “garbage collection”
Would recommend removing the "Other" comparison as pretty much anything that can be said there is wildly inaccurate. Would also like to see comparison with Zig as it seems to have similar goals.
Because we only allow you to store values with ownership inside other objects, you cannot have a circular reference. It uses reference counting to know if something needs to be freed or not. But because we keep track of ownership and moved values we are able to run an algorithm that removes most of these counts.
Can we please knock it off with reinventing different ways to declare a variable? This also irritates me about Rust. There’s nothing wrong with having syntax that looks like languages that have existed before. How about
[modifiers] [type] [variable name] = [initial value];
What I want in a programming language is not arbitrary new grammars, I want drop-in improvements to languages that already exist. C++ but with better dependency management. Python but statically typed (Mojo where you at?). PHP but standardize all the weirdness.
(Some or all of these rants could be out of date as my knowledge cutoff for languages ends at various times in the last 15 years.)
I don't like `let` because it's an extra four characters every time. But the
[variable name]: [modifiers] [type] = [initial value];
only has one extra character and avoids all of the problems.> Rust: Rust right now might be the best language out there right now. It's hard for us to criticize them because we lack the experience of building big rust projects. We do however think rust has a really slow compiler. We also think that rust might be too idealistic where it restricts the developer too much.
> C: C is obviously the best but... we dont always want to manage our own memory. Also their std-lib lacks alot of basic functions. You are forced to work with makefiles or similar build tools and most of those tools are very badly designed.
> C++: C++ is like a worse version of c. They do have the most features of any language, which allows the developers to write the greatest code and also the worst code. You let a developer work on a project for a year and suddenly you are looking at a codebase full of OOP, templates and the most hacky preprocessor logic you've ever seen. That developer says it's built using todays greatest standards, yet no one is able to understand the code at all. Sometimes you have to limit bad practices.
> Other: All other languages use garbage collection which makes them hard to use for millisecond realtime applications. Secondly, most languages allow you to have undefined behaviour.
I'm not sure if this section is really making the case you wanted to make. Either this needs to be rephrased or scrapped all together, it doesn't present the best foot forward because ideally you are recruiting people from these languages, and in your descriptions of them you make some very facile comparisons.
The way to do it I think is to properly mentor / monitor juniors rather than tying up hands of experienced developers.
See this post [0] from 2019. Things don't seem to have got much better in recent years [1] [2] [3].
[0] https://xeiaso.net/blog/v-vaporware-2019-06-23
[1] https://news.ycombinator.com/item?id=20230351
oh and, v-lang does have GC. they use boehm gc.
1) Uses GC as a convenient default and is optional (can be turned off with -gc none)
2) Can use autofree (enabled with -autofree)
3) Can use arena allocation (enabled with -prealloc)
4) Can be managed manually (-gc none)
So compilation times are dominated by llvm so there won't be any significant improvement on compilation speed.
> Ki is a statically typed language. It's advantage over most languages is that you cannot have any undefined behaviour.
Java, C, C++ are statically typed. I understand it's not many languages, but they do represent a pretty large share of coders...
Docs need some polishing tough. The comparison to other languages doesn't make the point of Ki clear to me.
Also, error handling feels like black-box magic with all those exclamation and question marks sprinkled everywhere. Those symbols seem vaguely chosen.
!? provides an alternative value when the function errors
!! exits the current scope on an error, e.g. return,continue,exit,...
It doesnt seem that complex. Ofcourse, there is also '??' and '?!'. That might make it more difficult. It's not vague actually. if it starts with '!', it's a function error handler. if it starts with '?', it's a null-check.