small, highly portable, garbage collected, compiled languge

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
ishkabible
Member
Member
Posts: 37
Joined: Wed Jan 05, 2011 7:35 pm

small, highly portable, garbage collected, compiled languge

Post by ishkabible »

So I was looking at writing applications for my OS(like a text editor and perhaps minesweeper) and I was pretty strongly considering using Lua. However, I was wondering if anyone knew of any compiled languages that are as portable(or nearly) as C but are somehow garbage collected and preferably can interface with C easily.
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: small, highly portable, garbage collected, compiled lang

Post by NickJohnson »

Go seems to fit that description. There are also JIT compilers available for Lua (it's impractical to AOT compile because of the dynamic typing though.)
User avatar
Combuster
Member
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: small, highly portable, garbage collected, compiled lang

Post by Combuster »

Well, GCC supports Objective-C, which in turn supports garbage collection. It's AOT compiled, and being a superset of C interfacing with C code is completely effortless.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
ishkabible
Member
Member
Posts: 37
Joined: Wed Jan 05, 2011 7:35 pm

Re: small, highly portable, garbage collected, compiled lang

Post by ishkabible »

I'll have to look at what is needed for Go to work. I found Rust which only requires a 'malloc' and 'free', it uses reference counting it seems.

I know about LuaJIT but I'm a bit worried it wont be very portable even though x86 is supported. I suppose it would just need an allocation function to allocate executable code space.

I'll also look at Obj-C too, see whats needed for it to work.
Post Reply