Live data from Hacker News

Cello – A library that brings higher level programming to C

libcello.org

21–30 of 158 posts

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

#21
> Can it be used in Production?

> It might be better to try Cello out on a hobby project first. Cello does aim to be production ready, but because it is a hack it has its fair share of oddities and pitfalls, and if you are working in a team, or to a deadline, there is much better tooling, support and community for languages such as C++.

Wow. Straight talk instead of salesmanship. High marks for that.

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

#22

Earlier quoted context omitted.

slow compile times, complex language, sanity

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.

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

#23
post #19
post #18

Earlier quoted context omitted.

That's like saying "Why not just use lisp?" to a python programmer. They're entirely separate languages (albeit it they do share some commonalities, but not as many as you might think). C is my main language and I dabble in C++. I really dislike C++. I love C. I welcome any efforts to add a bit of higher level functionality to C. I have no desire (ever) to switch to C++.

C programmer here. Cello isn't really C. So as long as you're using something that isn't quite C, and you want an object model, I think "why not C++?" is a reasonable question.

But it didn't look to me like Cello was an object model. To me, it felt more like Perl or Python than C++ - more like a dynamic scripting language.

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

#24
post #18

Why not just use C++?

That's like saying "Why not just use lisp?" to a python programmer. They're entirely separate languages (albeit it they do share some commonalities, but not as many as you might think). C is my main language and I dabble in C++. I really dislike C++. I love C. I welcome any efforts to add a bit of higher level functionality to C. I have no desire (ever) to switch to C++.

What do you love about C and hate about C++?

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

#25
IIRC Cello doesn't enforce type safety, which means you can foldl but it's not much different from writing foldl in C and using void pointers everywhere.

I had thought about trying to make a type-safe version of Cello but I eventually realized that I can't do it in cpp so at that point it became its own language and too much work (I did not write Cello).

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

#26
post #19
post #18

Earlier quoted context omitted.

That's like saying "Why not just use lisp?" to a python programmer. They're entirely separate languages (albeit it they do share some commonalities, but not as many as you might think). C is my main language and I dabble in C++. I really dislike C++. I love C. I welcome any efforts to add a bit of higher level functionality to C. I have no desire (ever) to switch to C++.

C programmer here. Cello isn't really C. So as long as you're using something that isn't quite C, and you want an object model, I think "why not C++?" is a reasonable question.

Looks like C to be. Just some macros and function calls.

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

#27

Earlier quoted context omitted.

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

Why did you find that crazy? They are 2 fully separate languages that have both evolved after the latter (C++) was first introduced.

I wouldn't call them "fully separate". Mixed C/C++ codebases are still fairly common, which works as long as the interface between them is in C.

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

#28

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++.

Can you provide C code that will not compile with c++ compiler?

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

#29

Earlier quoted context omitted.

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

Can you provide C code that will not compile with c++ compiler?

Sure:

struct Foo { int virtual; };

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

#30

Earlier quoted context omitted.

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

Can you provide C code that will not compile with c++ compiler?

Here's a bunch of examples: http://www.geeksforgeeks.org/write-c-program-wont-compiler-c...
Post reply on HN