Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Regarding C compatibility #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
flplv opened this issue Jan 10, 2017 · 1 comment
Closed

Regarding C compatibility #7

flplv opened this issue Jan 10, 2017 · 1 comment
Labels

Comments

@flplv
Copy link
Contributor

flplv commented Jan 10, 2017

Hi Bill,

I've watched your videos and read part of your code, I have to say, it is a very nice proposal this language of yours, I'd be happy to experiment with it.

I'd like to know what are your thoughts about C compatibility. I know it sounds strange this question, let me put my rationale to your judgment.

Assembly programming was successfully replaced by the C programming language, as we know today, yet, it is observable that you can still write assembly inside C code. C compilers support it since there's always a corner situation that developers might want to write assembly, such as optimization, integrating old code base or dealing with platform specificities. I anxiously wait for the day that C will be replaced, and the Odin programming language seems to be a competent candidate for that, but as we can learn from C vs assembly, I believe the the replacement will have to support C in a very considerable extent to make the replacement more likely to happen. We have already a lot of code written in C, even more that we had with assembly, also we live in times where there's really a huge amount of different platforms and providers where C runs, creating a very segmented ecosystem that relays on C as its foundation, which will impose even more resistance to a language migration. In face of that facts, I believe that we cannot simply replace C, but we'd have to embrace it in order to later replace it.

That's why I wonder how Odin is stands on this matter.

Best,
Felipe

@gingerBill
Copy link
Member

Odin can already interface with static and dynamic library very easily. It's how it interfaces with win32, opengl, and numerous other APIs. See sys/windows.odin for a big example. (The only thing not supported is C-style varargs in the calling conventions but that's due to numerous reasons).

I do think C can be replaced, but you are correct that there will be a transition period where you want/have to use existing C code. I want this language to replace my needs for C, completely, and I think it is already very possible to do so.

n.b. I already use Go(lang) for a lot server work and I don't need to interface with C at all as its libraries and tooling is so good that I don't need to interface with C (i.e. cgo).

@gingerBill gingerBill changed the title Reggarding C compatibility Regarding C compatibility Jan 10, 2017
@odin-lang odin-lang locked and limited conversation to collaborators May 12, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

3 participants