Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How is this different from Obj-C? Seems mostly like syntax sugar on top of what already exists in C.

The call and call_with are intriguing though.

Please change the name to something searchable and easily remembered before it's too late.



Well Objective C is a separate language entirely. This is just a library for GNU99 C.

Point about name noted, open to suggestions :)


"Mediterranean C". Fits, because it's more comfortable, more laid-back, less worrying-about-the-future C programming (si si, we typecheck mañana!).


On the other hand, this language appears to be working.


> Well Objective C is a separate language entirely.

Not quite; Objective-C is a superset of C. You can write pure C and compile it as Objective-C all day long.

This is an important point because people think their C knowledge doesn't translate to Objective-C, mainly because people say things like "it's entirely different". At its core, it really isn't -- the superset syntax becomes straight C underneath.


Beyond that, even, you can write Objective-C in pure C99. The brackets, class definitions, and all the rest is a sort of syntactic sugar that converts directly to a handful of straight C functions (you can find them all here: https://developer.apple.com/library/mac/#documentation/Cocoa...)


"Bluegoose C runtime"

What are the performance implications of these features? How do they compare with similar C++ functionality, especially things they do at compile-time? Can I have a pretty graph?

What trade-offs were made? Can they be improved? Are certain aspects or semantics optional? Do you pay the price of linking this library simply by linking it, or do you "only pay for what you use"?

Is it safe? Type-safe? If not, what's required to make them safe?

If you don't answer these questions, somebody like me will who's ignorant of how this is supposed to work will produce their own data. That's not good, you understand how it's supposed to be used.


That's a lot of questions. I will do my best to answer them but note I am not trying to sell a language here. I'm just a student and wanted to show an interesting project I'd been playing with.

The performance implications are much like vtable lookup in C++. Generic functions are essentially overloaded and their function pointer looked up at runtime. The main tradeoff over C++ is that rich types don't play well when allocated on the stack as destructors cannot be automatically called on frame exit.

The added semantics are not optional, but you can still program in standard C while avoiding the defined keywords and functions and the interaction should not be troublesome at all. There is no price for linking the library.

It is not type-safe and employs runtime type checking where inserted by the user - but also this allows for duck typing and more generic code so perhaps it is not a bad thing all round.

I hope that helps. Any more questions feel free to drop me an e-mail.


What about "C&"? C and

Short and easily searchable.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: