Live data from Hacker News

Cello – A library that brings higher level programming to C

libcello.org

51–60 of 158 posts

Re: Cello – A library that brings higher level programming to C

#52

Earlier quoted context omitted.

As a long-time C++ programmer I can say there's a lot of reasons to not use C++, but still, yeah. What about D? Rust?

C++ isn't strictly a superset of C! Which I always found crazy. Some C will not compile for C++.

It would be hard for it to be a completely strict superset of C because that would require not introducing new reserved words (like "class") since those end up being legal variable names in C but not C++.

Re: Cello – A library that brings higher level programming to C

#55

Why not just use C++?

Why not just write another language, that compiles to machine code, but doesn't totally enforce type safety. Call it Iron.

> Call it Iron

You pays the Gold price, or the Iron price.

Re: Cello – A library that brings higher level programming to C

#56
post #22

Earlier quoted context omitted.

Compile times aren't that slow, and the language is barely less complex than this insane hack. In fact C++'s complexity allows libraries to make their use a lot simpler. Consider string concatenation in C++ and C. Which is really simpler? The main reason I can think not to use C++ is that C has a simple stable ABI so you can easily use C libraries from many languages and compilers. But you can always wrap C++ librari…

> Compile times aren't that slow I beg to differ. C++ encourages placing more code than strictly necessary into header files. Even the standard headers such as add considerably to the compile time, and they keep getting larger with every revision of the standard. When you are making incremental changes, it accumulates to a lot of time spent waiting.

use precompiled headers?

Re: Cello – A library that brings higher level programming to C

#57

Why not just use C++?

Why not just write another language, that compiles to machine code, but doesn't totally enforce type safety. Call it Iron.

That's what Martin Richards did when he couldn't get a high-level language to run on crap hardware. Chopped features until BCPL compiler worked. That inspired and vot turned into C.

So, this Iron language sounds like deja vu to me from two, different directions. I recommend against it.

Re: Cello – A library that brings higher level programming to C

#58

Earlier quoted context omitted.

Why not just write another language, that compiles to machine code, but doesn't totally enforce type safety. Call it Iron.

I get that it's a joke, but for those who are tempted, I'd use a different name: https://github.com/IronLanguages http://iron.ouroborus.net

The name is specific to what they're poking fun at. They'd have to find another decaying process with a simple name maybe.

Re: Cello – A library that brings higher level programming to C

#59
There are several reasons why people use C, one of them is that the language makes it very explicit what generated code is going to look like. That's one of the reasons why Windows kernel is written in C (https://msdn.microsoft.com/en-us/library/windows/hardware/ff..., https://view.officeapps.live.com/op/view.aspx?src=http://dow...). Libraries like this obfuscate source code.

Re: Cello – A library that brings higher level programming to C

#60
post #43

Earlier quoted context omitted.

They have separate ISO standards. IMO, this makes them fully separate. C - ISO/IEC 9899:2011 C++ - ISO/IEC 14882:2014

But the standards have made some effort at avoiding gratuitous incompatibility, and have even introduced changes to reflect changes in the other standard. Also, much C code is still valid C++. Sure, you can write code that isn't, but I would guess (pulls a number out of nowhere) that 90% of the valid C code is also valid C++. That makes them languages that have separate standards, but not completely independent stand…

[deleted]
Post reply on HN