You are not logged in.
Pages: 1
Hello all,
I've been learning Java for a while now, but it seems very bloated and not at all lightweight, so I want to learn something else.
People have written good things about Objective-C in this forum, but I wonder about compability with Linux. It seems that without Cocoa, Objective-C is pretty useless?
Or should I just go with pure C (though I'm not sure about leaving all those nice OOP-principles behind)?
Offline
Objective-C is not without its bloat either. Though not nearly as bad as Java.
Objective-C is pretty much useless on linux. I suppose no language is useless as long as you don't mind writing your own libraries.
I'm sure no one else will agree with me but if you want something fast like C and you enjoy OOP principles then give C++ a try. It is a great language beyond what folks say. The library compatibility alone is reason enough to try it. I don't find it to be that overly complex compared to C. I find C++/Qt programs to be particularly easy to follow.
Offline
I suppose no language is useless as long as you don't mind writing your own libraries.
Well, I don't see myself rewriting Cocoa for Linux . And from what I read in the two C vs. C++ threads, C++ seems to be really bloated (and therefore not better than Java).
Offline
dalingrin wrote:I suppose no language is useless as long as you don't mind writing your own libraries.
Well, I don't see myself rewriting Cocoa for Linux . And from what I read in the two C vs. C++ threads, C++ seems to be really bloated (and therefore not better than Java).
lol are you comparing c++ to java in bloatness ?
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
dalingrin wrote:I suppose no language is useless as long as you don't mind writing your own libraries.
Well, I don't see myself rewriting Cocoa for Linux . And from what I read in the two C vs. C++ threads, C++ seems to be really bloated (and therefore not better than Java).
Define bloat.
If by bloat you mean, slow because of extra features/addons, then I disagree. C++ is certainly not slow.
If by bloat you mean, too many features/addons, then I partially agree. However, you don't have to use every single feature of C++ in every source file of every program. C++ gives you choice.
Is C++ simple and clean like Python? No of course not. C++ gives you the speed of C(very close to) plus the ability to choose the programming paradigm you want. Have a small program to write? Use C++ to write a structured program(very much like you would with C). Have some some code you'd like to easily reuse? Use C++ for generic programming. Have a large project? Use C++ for OOP.
Don't get me wrong C++ is not perfect but, there is a reason why it is so widely used.
Last edited by dalingrin (2009-04-14 15:07:42)
Offline
(...)Or should I just go with pure C (though I'm not sure about leaving all those nice OOP-principles behind)?
Have you tried using C implementing ADT's?
ZzZz...
Offline
lol are you comparing c++ to java in bloatness ?
Yes.
Define bloat.
If by bloat you mean, slow because of extra features/addons, then I disagree. C++ is certainly not slow.
If by bloat you mean, too many features/addons, then I partially agree. However, you don't have to use every single feature of C++ in every source file of every program. C++ gives you choice.Is C++ simple and clean like Python? No of course not. C++ give you the speed of C(very close to) plus the ability to choose the programming paradigm you want. Have a small program to write? Use C++ to write a structured program(very much like you would with C). Have some some code you'd like to easily reuse? Use C++ for generic programming. Have a large project? Use C++ for OOP.
Yeah, but reading those C vs C++ threads makes me feel there's something seriously wrong about C++.
And if I had to write my own libraries to use Objective-C on Linux, it seems like C is way to go.
Offline
moljac024 wrote:lol are you comparing c++ to java in bloatness ?
Yes.
dalingrin wrote:Define bloat.
If by bloat you mean, slow because of extra features/addons, then I disagree. C++ is certainly not slow.
If by bloat you mean, too many features/addons, then I partially agree. However, you don't have to use every single feature of C++ in every source file of every program. C++ gives you choice.Is C++ simple and clean like Python? No of course not. C++ give you the speed of C(very close to) plus the ability to choose the programming paradigm you want. Have a small program to write? Use C++ to write a structured program(very much like you would with C). Have some some code you'd like to easily reuse? Use C++ for generic programming. Have a large project? Use C++ for OOP.
Yeah, but reading those C vs C++ threads makes me feel there's something seriously wrong about C++.
And if I had to write my own libraries to use Objective-C on Linux, it seems like C is way to go.
There is a subset of users who feel that C++ is the plague. Keep in mind this is just a subset of users. It comes down to personal choice. I don't prefer to use C++ because I'm a masochist.
You, as someone who is coming from java, are probably going to get about halfway into C then decide it isn't worth the trouble.
There are so many things that you probably take for granted in Java that will be lacking in C. I think C++ is a much better compromise. I say this from the experience of starting out in Python and trying C then going with C++.
These two questions sum up how I feel about C vs C++:
What can you do in C that you can't do in C++? What can you do in C++ that you can't do(easily) in C?
This is all predicated on developing things other than kernel or drivers. Otherwise you do need to break our your C and Assembly language books.
You really need to define what you mean by bloat.
Last edited by dalingrin (2009-04-14 15:33:07)
Offline
There's nothing seriously wrong with C++. Learn it and you won't be sorry.
Matt
"It is very difficult to educate the educated."
Offline
You really need to define what you mean by bloat.
It's not exactly bloat, but: Java is slow, you have to have the JVM installed, "write once, run everywhere" really comes down to "run anywhere, it sucks everywhere" (i.e. Swing), mediocre support from Sun, ....
Edit:
There's nothing seriously wrong with C++. Learn it and you won't be sorry.
OK, so Objective-C isn't cool on Linux, so I'm probably going with C/C++.
Last edited by MrAllan (2009-04-14 15:38:25)
Offline
dalingrin wrote:You really need to define what you mean by bloat.
It's not exactly bloat, but: Java is slow, you have to have the JVM installed, "write once, run everywhere" really comes down to "run anywhere, it sucks everywhere" (i.e. Swing), mediocre support from Sun, ....
Trust me C++ is not bloated in the sense of speed.
Its one of the most widely used programming languages in performance critical applications.
I'll take C++/Qt for "write once, run everywhere" way before Java.
You are letting the GTK+ people get to you.
Last edited by dalingrin (2009-04-14 15:41:33)
Offline
Imo, C++ is be best choice. It is fast, widely supported and there is plenty of libraries. Just you do not have to be shy and seek a little in the Internet.
The only reasons I can see for using C instead of C++ are:
- lack of good compilers, in the embedded systems world for example
- the will to learn, C++ gives you many powerful features C does not. Being forced to reimplement everything gives lots of knowledge about how technologies works and how much they cost: just imagine how in C you would implement classes and hierarchy of classes with virtual functions; managing all those tables of function pointers is instructing.
Offline
Hello all,
I've been learning Java for a while now, but it seems very bloated and not at all lightweight, so I want to learn something else.
People have written good things about Objective-C in this forum, but I wonder about compability with Linux. It seems that without Cocoa, Objective-C is pretty useless?
Or should I just go with pure C (though I'm not sure about leaving all those nice OOP-principles behind)?
If you are interested in Objective-C you might want to look at the GNUStep project (http://www.gnu.org/software/gnustep/) they implement the OPENStep specification and most of the cocoa extensions. The main downside to using objective-c on linux that I can see seems to be the lack of visual integration with gtk/Qt desktops if you are writing a GUI application.
Offline
Objective-C is a nice language and I would love to see gnustep get some more development. It would be great if they could implement some kind of a native widget scheme on various platforms.
Offline
Well, say I learn Objective-C, I guess I will learn some C (and maybe even C++) on the way, right?
Last edited by MrAllan (2009-04-14 21:26:27)
Offline
Well, say I learn Objective-C, I guess I will learn some C (and maybe even C++) on the way, right?
You will learn the syntax that they all have in common, yes.
Out of curiosity, what type of things do you plan to program? Did you learn Java in school?
Offline
Why not try D?
Offline
I hate c++ ./flame ./flame ./flame ./flame
Offline
Well, say I learn Objective-C, I guess I will learn some C (and maybe even C++) on the way, right?
Let's say you sit down and learn Objective-C, you will learn many new and interesting things. Even if you ditch it after some time because you think it's grotesque, you will at least have learned something new.. And that can't be bad, isn't it? I mean, it's fun to talk about programming languages, looking for the "best one" and whatever, but as your doing that, you're not learning any new languages.
About your question: I never wrote Objective-C code, but it doesn't seem so far from C. What you say about trying it and give us your feedback?
Anyway, best of luck for your projects!
I KISS you.
Offline
There is a subset of users who feel that C++ is the plague. Keep in mind this is just a subset of users.
Well, if it's just a subset then they must not know what they're talking about.
This wouldn't be the first time something terrible was popular. See: most popular things.
Offline
I mean, it's fun to talk about programming languages, looking for the "best one" and whatever, but as your doing that, you're not learning any new languages.
True that
Out of curiosity, what type of things do you plan to program? Did you learn Java in school?
Yeah, I (still) learn Java in school. And I have no idea what to program, because for everything usefull there's a program already, so I'm basically just coding pointless stuff to learn the language.
GNUStep seems nice, but the fact that it doesn't blend with GTK/QT is a real drawback. No GUIs for Linux, then.
Last edited by MrAllan (2009-04-15 08:01:36)
Offline
Why not try D?
I would wait with recommending D to anybody until the issue with the conflicting standard libraries has been resolved (if it ever will). It's just ridiculously confusing for anybody who wishes to learn the language and the fact that v2.0 of D is still a somewhat moving target does not make things easier. But I agree that for ex Java developers, D would be a smooth transition to.. lower level languages.
Offline
Zariel wrote:Why not try D?
I would wait with recommending D to anybody until the issue with the conflicting standard libraries has been resolved (if it ever will). It's just ridiculously confusing for anybody who wishes to learn the language and the fact that v2.0 of D is still a somewhat moving target does not make things easier. But I agree that for ex Java developers, D would be a smooth transition to.. lower level languages.
Is D ever going to kick off ?
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
Is D ever going to kick off ?
I personally believe that languages like Vala might "make it" before D does. The problem I have with D, is that the C++'s ABI is not fully supported. That's why I think it will never make it. If you make a language for oldtime C++ developers, you better be backwards compatible. Just look at Scala (for oldtime Java developers).
Oh, and did I mention the two conflicting "standard" libraries? I guess that's the good thing about standards; so you can choose which one to use.
Last edited by krigun (2009-04-15 11:51:24)
Offline
Pages: 1