Live data from Hacker News

Cello – High Level C

libcello.org

41–50 of 83 posts

Re: Cello – High Level C

#41
Isn't this sort of what Glib is getting at? Bringing higher level data structures and capabilities (extendable arrays, hash tables, heaps, etc.) into C.

https://developer.gnome.org/glib/stable/glib-data-types.html

You don't get Cello's macros, and it uses reference counting instead of invisible garbage collection, but you get a lot of fun high-level capabilities.

Re: Cello – High Level C

#42

Earlier quoted context omitted.

> Speaking for myself, I’ve never found C++’s complexity appealing, and it only seems to be getting worse over the last 20 years. True, but that's why we've got Rust these days. (Rust is actually more optimized than C, e.g. it will automatically reshuffle your structs to get rid of excess padding, and reference accesses will automatically take advantage of compiler-checked 'restrict' constraints, thus equalizing perf…

How is Rust an answer to not liking C++‘a complexity. With the complexities inherent in the borrow semantics (with the box ref cell stuff that comes with it) and the complexities inherent in the type system and trait system, Rudy seems to be at least as complex as C++. In fact this point gets tossed out a lot, Rust is not a C replacement for C developers, it is at best a C++ replacement for developers who want someth…

Rust is the answer to EVERYTHING on HN. Even when that person has never used Rust before.

Re: Cello – High Level C

#44
This gets reposted every couple years and it's still bad for all of the same reasons.

It's not higher level than C in the sense that you get any additional safety guarantees or real beneficial abstractions. If you are fine without the safety but want abstractions, use C++. If you want safety and abstractions, use Rust or Go or Zig. If you really want a transpile-to-C language, you've got Nim.

Finally, it's not good at being C; everything it does is poor practice and should be quickly recognized as such by experienced C developers, IMO. It's got no developer community and no real-world production consumers.

Re: Cello – High Level C

#45
post #5
post #4

Why not just C++?

Speaking for myself, I’ve never found C++’s complexity appealing, and it only seems to be getting worse over the last 20 years. As the creator says, it’s not for production use. If I’m doing a side project, I’d give this a serious look.

Sure, but Cello's complexity turns me off for the same reasons as C++'s complexity. The question isn't "why not use C++?" in isolation, but instead, "why would you use Cello over C++?"

Re: Cello – High Level C

#46
Looks interesting, but I can't help but notice they're distributing their source tarball via that site, and it doesn't have HTTPS. I don't understand why projects don't have SSL certs these days, especially considering Let's Encrypt has automated it all and made it free.

Re: Cello – High Level C

#47
post #34

Seen this posted here years ago. Now as then, my gut feeling is that anyone doing serious work in C would never use something like this-- I feel like the fine grained low level control is exactly the reason they chose C in the first place, and they're not looking to escape from it or they would just choose a different language.

> 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…

> 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

#48

Seen this posted here years ago. Now as then, my gut feeling is that anyone doing serious work in C would never use something like this-- I feel like the fine grained low level control is exactly the reason they chose C in the first place, and they're not looking to escape from it or they would just choose a different language.

The fine-grained control is just a statement away. When you're not using the $(...) macros, it's just normal C.

It's pretty much exactly the same like the low-level-C techniques being instantly available for you in C++ or Objective C.

Re: Cello – High Level C

#49

Seen this posted here years ago. Now as then, my gut feeling is that anyone doing serious work in C would never use something like this-- I feel like the fine grained low level control is exactly the reason they chose C in the first place, and they're not looking to escape from it or they would just choose a different language.

[deleted]

Re: Cello – High Level C

#50
post #5

Earlier quoted context omitted.

Speaking for myself, I’ve never found C++’s complexity appealing, and it only seems to be getting worse over the last 20 years. As the creator says, it’s not for production use. If I’m doing a side project, I’d give this a serious look.

> Speaking for myself, I’ve never found C++’s complexity appealing, and it only seems to be getting worse over the last 20 years. True, but that's why we've got Rust these days. (Rust is actually more optimized than C, e.g. it will automatically reshuffle your structs to get rid of excess padding, and reference accesses will automatically take advantage of compiler-checked 'restrict' constraints, thus equalizing perf…

C has restrict

also, gcc and llvm can infer restrict much of the time if you don't manually use it

and I fail to see how having explicit control over struct layout is ever a bad thing

Post reply on HN