> let num : u8 = 5; 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 exi…
Show HN: Ki Programming Language
51–60 of 80 posts
Re: Show HN: Ki Programming Language
#52Reference counting is garbage collection. I mention this because the site claims no GC nut you claim I'm this thread that ref counting is sometimes used, which makes sense because borrowing sometimes isn't enough.
While reference counting is technically a method of collecting garbage, in modern parlance the phrase "garbage collector" is mainly used for systems capable of collecting garbage of an arbitrary reference graphs, which reference counting by itself cannot do (cyclic references).
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.
Re: Show HN: Ki Programming Language
#53Earlier quoted context omitted.
V-lang doesn't have GC, and how it compares to it?
I think v-lang is faster than ki, rust, go. But their memory management isnt waterproof. Also, they have been in development for a really long time and there isnt much progress. They should have reached 1.0 by now, but they havent and i think it's because the language might have problems. oh and, v-lang does have GC. they use boehm gc.
Re: Show HN: Ki Programming Language
#54Earlier quoted context omitted.
V-lang is vaporware, designed to get Patreon bux off of gullible enthusiasts. 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 [2] https://news.ycombinator.com/item?id=20229632 [3] https://news.ycombinator.com/item?id=31793554
I've got no particular interest in V, but the hate it gets from a certain group of people here is really perplexing and I don't think it's at all warranted from what I've seen.
Re: Show HN: Ki Programming Language
#55Confused by the "C#: We do not use languages that expect you to install a 20GB IDE just to compile a 'hello world'." note, the .NET SDK is ~200MB last I checked, and Visual Studio is not required to compile C#. Seems like the https://ki-lang.dev/dist/download/linux/x64/latest build from Ki is ~40MB, so similarly sized.
i'll remove it ^_^ it seemed like they want you to use Visual studio and for me it was like 10GB+ for a minimal setup. idk.
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.
Re: Show HN: Ki Programming Language
#56Why would someone choose this over Rust?
Re: Show HN: Ki Programming Language
#57Another brand new language with curly braces and semicolons... emphasizing line noise over information /sigh OK, ok, I'll show myself out.
Re: Show HN: Ki Programming Language
#58> let num : u8 = 5; 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 exi…
Re: Show HN: Ki Programming Language
#59Another brand new language with curly braces and semicolons... emphasizing line noise over information /sigh OK, ok, I'll show myself out.
What would you suggest instead? Please do not say Python. Using spaces for syntax is madness.
Re: Show HN: Ki Programming Language
#60> let num : u8 = 5; 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 exi…
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.