OS in OBJ-C
-
- Posts: 21
- Joined: Mon May 03, 2010 10:19 pm
- Location: Asia, Planet Earth, Solar system, Milky way
OS in OBJ-C
I would like to know if it is possible to write an OS in Obj-C. I have not found much documentation on it but like the language.
Zephirum OS- Super secure http://code.google.com/p/zephirum-server/
Number of blue screens of death I have seen: 19
Number of apple OS X kernel panics I have seen: 2
Number of linux kernel panics I have seen: 0
Number of blue screens of death I have seen: 19
Number of apple OS X kernel panics I have seen: 2
Number of linux kernel panics I have seen: 0
Re: OS in OBJ-C
See Languages in the Wiki.
Plus, personal advice: Answer yourself the question if you like the language, period, or if you like the language because you know it better than the others.
It is usually easier to adapt your skillset to the project (learning a new language), than it is to adapt your project to the skillset (doing a project in a language that is not the best choice for the problem domain).
Plus, personal advice: Answer yourself the question if you like the language, period, or if you like the language because you know it better than the others.
It is usually easier to adapt your skillset to the project (learning a new language), than it is to adapt your project to the skillset (doing a project in a language that is not the best choice for the problem domain).
Last edited by Solar on Mon Sep 27, 2010 6:49 am, edited 1 time in total.
Every good solution is obvious once you've found it.
Re: OS in OBJ-C
I thought we had an Obj-C barebones around - I searched for it but couldn't find it.
Did we have one, or am I just seeing things?
Did we have one, or am I just seeing things?
- Owen
- Member
- Posts: 1700
- Joined: Fri Jun 13, 2008 3:21 pm
- Location: Cambridge, United Kingdom
- Contact:
Re: OS in OBJ-C
I don't think we have.
Objective-C is very doable - but fast Objective-C isn't at all easy. Even the biggest promoters of it, Apple, use C++ instead for their kernel.
Basically, the biggest issue is that you will need some form of heap before you can bring up most of the optimizations - which implies you end up with two code paths for the same thing.
Of course, you're in pretty good luck since the Objective-C runtime can be written in straight C (you may want to implement things like objc_msgSend in assembly for speed, though).
Objective-C is very doable - but fast Objective-C isn't at all easy. Even the biggest promoters of it, Apple, use C++ instead for their kernel.
Basically, the biggest issue is that you will need some form of heap before you can bring up most of the optimizations - which implies you end up with two code paths for the same thing.
Of course, you're in pretty good luck since the Objective-C runtime can be written in straight C (you may want to implement things like objc_msgSend in assembly for speed, though).
Re: OS in OBJ-C
Mac os x uses objective c... Look it up on wikipedia.
I've been programming for 6 years, and can learn most languages in a day....you really wanna start a fight?
Re: OS in OBJ-C
Do you expect to start w/o a kernel? Everyone here assumes you mean you want to start a kernel, b/c your asking about starting an OS, with obviously starts with writing the kernel. Contrary to anything you may have read on Wikipedia, very little(I've found no .m so far.) of XNU is in obj-c. See for yourself... Look it up on Apple's website.rocko384 wrote:Mac os x uses objective c... Look it up on wikipedia.
-
- Posts: 21
- Joined: Mon May 03, 2010 10:19 pm
- Location: Asia, Planet Earth, Solar system, Milky way
Re: OS in OBJ-C
Apple's OS is mostly in c and c++ (XNU). The Objective-C is for high level only. the main reason I would like to use objective c is its convienience and the fact that a single method can return two variables. Would it need a different linker script?
Zephirum OS- Super secure http://code.google.com/p/zephirum-server/
Number of blue screens of death I have seen: 19
Number of apple OS X kernel panics I have seen: 2
Number of linux kernel panics I have seen: 0
Number of blue screens of death I have seen: 19
Number of apple OS X kernel panics I have seen: 2
Number of linux kernel panics I have seen: 0
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: OS in OBJ-C
Moot?
Objective-C is not inherently contributing to good programming practices, and it accepts only one argument to return (which basically means there is no advantage over any other language as C and C++ do multiple returns in the same fashion: via pointer arguments or structs)
And the mere fact that you blankly ask about linker script changes suggests that you do not have the expert knowledge on the language required to use it in an OS development context.
In other words: Solar++; learn a proper language for the job.
Objective-C is not inherently contributing to good programming practices, and it accepts only one argument to return (which basically means there is no advantage over any other language as C and C++ do multiple returns in the same fashion: via pointer arguments or structs)
And the mere fact that you blankly ask about linker script changes suggests that you do not have the expert knowledge on the language required to use it in an OS development context.
In other words: Solar++; learn a proper language for the job.
-
- Posts: 21
- Joined: Mon May 03, 2010 10:19 pm
- Location: Asia, Planet Earth, Solar system, Milky way
Re: OS in OBJ-C
I have been deving my OS in C thus far. just wanted a change
Zephirum OS- Super secure http://code.google.com/p/zephirum-server/
Number of blue screens of death I have seen: 19
Number of apple OS X kernel panics I have seen: 2
Number of linux kernel panics I have seen: 0
Number of blue screens of death I have seen: 19
Number of apple OS X kernel panics I have seen: 2
Number of linux kernel panics I have seen: 0