Earlier quoted context omitted.
C3 has "path shortening", so for example given `open(...)` in std::io::file is usually used as `file::open(...)`. If we would to write this as `file.open(...)`. Consider now the case of mistyping `open`: `file.openn(...)`. Is this (A) mistyping the function open in module `std::io::file` or is it (B) the global/local `file` is missing from the current scope? Also, "io", "file", "random" etc are commonly used variable…
I feel like path shortening is the issue, and IMO it's an unnecessary feature. I don't think most programmers are bothered by the need to explicitly import what they use. I'd personally prefer to explicitly import what I use, and refer to it in whatever way the import statement would imply. In Rust where modules share a namespace with other identifiers, I just pick different variable names, or write my imports so the…
Show HN: The C3 programming language (C alternative language)
141–150 of 192 posts
Re: Show HN: The C3 programming language (C alternative language)
#142Earlier quoted context omitted.
Did you know that Wikipedia editors will aggressively remove Wiki entries about less known languages. There are already several wiki articles on Odin by various authors that have been removed over the years. Talking about GitHub numbers, we can look at VLang, which had an astronomical trajectory initially due to overpromising and selling a language that would solve long standing issues such as no manual memory manage…
Wikipedia and their processes are independent to any language. It means that if Odin or other languages were removed, they were likely judged as not meeting the standard or not popular enough. That the Odin language is so old (around 9 years), and still not on it, is indicative of it not being as popular as various people are hoping. The use of negative catch phrases and envious put downs by competitors of Vlang has…
This idea is what I criticize.
Not to mention that Wikipedia’s notability criteria is increasingly harder to live up to as tech news gets more and more decentralized.
It is not enough for notability that the Odin author is interviewed in various podcasts. It’s not enough for the language to be used in a leading visual effects tool and so on. These are not valid references for Wikipedia.
So how did Vlang achieve it? By commissioning books on the language(!). Once there was a book on V (nevermind no one bought it) it fulfilled the Wikipedia criteria. There are discussions about this on various V forums.
So let go of the idea that Wikipedia is proving anything.
Re: Show HN: The C3 programming language (C alternative language)
#143Earlier quoted context omitted.
It is possible to use a single-header library as part of C3 libraries or your project. However, it must be noted that this will inhibit the ability to cross compile, as the compilation of the header is outsourced to the natively installed C compiler. For that reason it's not an option for the standard library, but can certainly be useful for programs and libraries. For faults, they are usually defined with `faultdef`…
Thank you! Is it possible to do something like: faultdef { FOO, // comment BAR, // another comment BAZ, // yadda // Maybe this would work, too (for docgen if available) QUX } or something like that? Does C3 have a way to generate documentation?
faultdef
FOO, // comment
BAR, // comment
QUX; // comment
There are third party tools to generate docs. You can also get some json output from the c3 compiler itself to base docs onRe: Show HN: The C3 programming language (C alternative language)
#144Earlier quoted context omitted.
Ah, that is indeed true. However, the plan is to have the language fixed at 1.0, only updating stdlib and tooling after that.
Well, if your language gains traction that plan may not succeed. For your sake, I hope that's the case :)
Re: Show HN: The C3 programming language (C alternative language)
#145Does it have native fixed point types?
What would you like to use it for?
Re: Show HN: The C3 programming language (C alternative language)
#146Why the “fn” token?
Re: Show HN: The C3 programming language (C alternative language)
#147Does it have native fixed point types?
No, there is an incomplete proposal for it here though: https://github.com/c3lang/c3c/issues/1451 What would you like to use it for?
Imagine using it on a 6809 system for example. :)
Re: Show HN: The C3 programming language (C alternative language)
#148Earlier quoted context omitted.
Notably all of these you mentioned aren't finished. C3 is 0.7, Jai is an "internal beta", Odin is working through a series of "dev" builds, Zig is 0.14, and Hare 0.24.2 This is maybe more striking when comparing against C which was already very old and battle tested in 1989 when it was standardized. If you pick any of these languages you're accepting an unknowable amount of churn. It better be worth it.
>This is maybe more striking when comparing against C which was already very old and battle tested in 1989 when it was standardized. If you pick any of these languages you're accepting an unknowable amount of churn. C has plenty of issues too, even though it is very old, battle tested and standardized. (How about all the UB in C, for example?) That is why people are looking for C alternatives in the first place. >It…
The notable commonality of these "C alternatives" is that they are still moving targets and yet that wasn't mentioned.
Re: Show HN: The C3 programming language (C alternative language)
#149Earlier quoted context omitted.
Wikipedia and their processes are independent to any language. It means that if Odin or other languages were removed, they were likely judged as not meeting the standard or not popular enough. That the Odin language is so old (around 9 years), and still not on it, is indicative of it not being as popular as various people are hoping. The use of negative catch phrases and envious put downs by competitors of Vlang has…
Odin isn’t as well known as Zig, true. But what you seemed to argue was that this was a deliberate choice by the Odin community: to look for hype on Hacker News rather than doing the leg work of getting a Wikipedia article about the language. This idea is what I criticize. Not to mention that Wikipedia’s notability criteria is increasingly harder to live up to as tech news gets more and more decentralized. It is not…
The first book written about V (5 years ago), looks to have been a total surprise to the community and its creator, because it was written in Japanese[1]. The 2nd book written about V has clearly sold well and received very good reviews[2]. It's author had no connection with V development and there are interviews about him. A 3rd book[3], which was for academic circles, is not primarily about V. It, however, uses the programming language for random number generation and explanations on the subject.
The point I'm getting at, is marketing one's self on HN or podcasts as a viable alternative versus being an actual viable alternative used by the general public. It's one thing to act like or say your popular, it's another thing to be popular. There is a qualitative difference, that is even picked up on by Wikipedia, which is arguably why Odin or C3 don't have a page or the numbers on GitHub.
Despite any misdirected anger or envy, that problem has nothing to do with other languages like V or even Zig. It's up to fans and interested third parties of that language to show and report widespread usage.
[1] https://www.amazon.com/dp/B08BKJDRFR (Book about V (Vlang) in 2020 and in Japanese)
[2] https://www.amazon.com/dp/B09FKK3JL7 (Book about V (Vlang) in 2021, highly rated, and sold well)
[3] https://doi.org/10.52305%2FCVCN5241 (Book is part of an academic series, 2023, and uses V (Vlang))
Re: Show HN: The C3 programming language (C alternative language)
#150Earlier quoted context omitted.
Surely Zig differentiates between, say, a function in a module, and a member on an object? Or are "modules" literally just instances of classes or something?
all structs are namespaces (there no classes). namespaces may contain declarations (consts and functions) or fields ("fields" are slightly different for unions or certain builtins like arrays and slices) unions and enums also create namespaces. any @import creates a namespace that is a struct. If a function's first argument is the type of the function's namespace or a pointer to the type of the namespace, you may (an…