News for hackers. Stuff that matters.
Re:Cello – High Level C by flukus on Monday January 20, 2020 @07:36PM (#22103279)
> I feel like the fine grained low level control is exactly the reason they chose C in the first place

That's not the only reason, there is also simplicity, static typing and performance. If you favor the later two for whatever reason it can be used in places where you'd normal write a python/shell script or small program without too much extra effort (see https://github.com/RhysU/c99sh or suckless tools). Complexity is where Cello seems to fall down though, it seems like it introduces much more complexity than just using plain C with a decent "standard" library like glib.

Re:Cello – High Level C by da_chicken on Monday January 20, 2020 @08:40PM (#22103631)
> That's not the only reason, there is also simplicity, static typing and performance.

I think the only meaningful benefit here is performance.

Simplicity is at best determined by the nature of the problem and at worst a completely subjective opinion for C.

Similarly, static typing is not usually something the programmer should care about that much. You need to know which paradigm your language uses, of course, but beyond that it does not matter all that much. IMX, you're more concerned with type safety, and C is not fully type safe like, say, Java is.

Re:Cello – High Level C by flukus on Tuesday January 21, 2020 @01:22AM (#22104701)
Yes it's somewhat subjective, but other languages for the use case usually contain a lot more abstractions. They're more complex languages but they might enable less complex solutions to the problem at hand.

> IMX, you're more concerned with type safety, and C is not fully type safe like, say, Java is.

I'm concerned with finding errors, preferably at compile time. There have been very few times being fully type safe runtime like the jvm have done much for me compared to the java compiler. If I wanted more down that road then rust or ada would probably be better.

Re:Cello – High Level C by madmax96 on Tuesday January 21, 2020 @10:22AM (#22107685)
Measure the complexity of a language as the number of axioms required to define it. In reality, the C standard is incredibly brief, defining the core language in ~150 pages. This makes C simpler than languages like C++ and Java and the definition is not at all subjective and is useful.
Re:Cello – High Level C by kungtotte on Tuesday January 21, 2020 @01:15AM (#22104682)
You could also just pick something like Nim (https://nim-lang.org) if you wanted to hit the intersection of low effort, script-style programming with the addition of types and performance.
Re:Cello – High Level C by tluyben2 on Tuesday January 21, 2020 @01:53AM (#22104820)
Did Nim compile times improve? I wrote a production project in it which was about 50k loc and I spent most time waiting for compilation.
Re:Cello – High Level C by kungtotte on Tuesday January 21, 2020 @04:05AM (#22105359)
I just checked out and built the Nim compiler + stdlib itself.

real: 161.26s (including the GCC bootstrap stage).

cloc reports 253500 lines of Nim in the project.

This was on a Ryzen 7 3700x @ 3.6GHz.

Re-running it immediately after (does not build the GCC bootstrap stage)

real 22.55s