Live data from Hacker News

Cello – A library that brings higher level programming to C

libcello.org

31–40 of 158 posts

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

#31

Earlier quoted context omitted.

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.

Mixed C, Objective C and C++ code-bases are still fairly common. That's not to say they're the same language.

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

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

For "pure C" with high level string and dynamic memory handling (with data types in both heap and stack), consider checking https://github.com/faragon/libsrt (not production ready for "NASA-like" things, but I've put an important effort in test-coverage, aliasing awareness, etc.) :-)

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

#33
post #24
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++.

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

I'm not the parent, but C has a certain simple elegance: everything's an int; those things which aren't ints (e.g. compound structures like structs and arrays) are represented using pointers and offsets, so in a sense they're also ints; except for floats, but meh.

In C++, everything is an int; except for objects; and templates; and lambdas; and classes; and exceptions; and all the other things which keep getting chucked on to the pile.

I like languages with a clear, simple concept behind their operation: lambda calculus, combinatory logic, Scheme, Forth, Joy, Pure, etc. C is a bit gnarly, but passable. C++ is horrible.

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

#34

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.

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

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

#35
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.

Why would you say that "Cello isn't really C"?

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

#36
post #24

Earlier quoted context omitted.

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

I'm not the parent, but C has a certain simple elegance: everything's an int; those things which aren't ints (e.g. compound structures like structs and arrays) are represented using pointers and offsets, so in a sense they're also ints; except for floats, but meh. In C++, everything is an int; except for objects; and templates; and lambdas; and classes; and exceptions; and all the other things which keep getting chuc…

>I like languages with a clear, simple concept behind their operation.

So you dont like C because Undefined behaviour complexitys. Im confused now.

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

#37

Earlier quoted context omitted.

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

This is a great example of how many of the things in C that don't compile in C++ are horrible programming practices, and it's really nice that C++ doesn't allow such garbage.

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

#38
post #35
post #19

Earlier quoted context omitted.

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.

Why would you say that "Cello isn't really C"?

It's arguable that extensive use of macros and faux-dynamic-typing violate the ideology of C that makes it simple and predictable.

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

#39

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…

To be pedantic, the C standard doesn't define an ABI[1] – it just seems that way because implementations follow the platform they're building for.

[1] http://stackoverflow.com/questions/4489012/does-c-have-a-sta...

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

#40

Earlier quoted context omitted.

And make sure Iron has a small group of annoying, hardcore fans who relentlessly disrupts any thread about C or indeed programming in general with their ham fisted advocacy.

I wonder if the Iron fans realize that they are doing more harm than good the way they go about this. It reminds me of the perl zealot days.

The Iron fans are doing a bit of harm but that Perl zealotism is one of the things that made it wildly popular in its day. And unlike Perl, Iron development is structured, not "organic" a la Larry Wall/Perl.

I'm not an Iron zealot but I do believe that there rarely is such a thing as bad publicity :)

Post reply on HN