Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ul1984

macrumors member
Original poster
Oct 3, 2008
30
0
Sweden
http://tirania.org/monomac/archive/2011/Mar-17.html

Am I the only Mac developer who's never really done any C#/.NET who stills finds this very interesting?

I find the C# language quite nice after playing it for a few days, I'm almost sorry to say but it kinda feels like a real language compared to ObjC: good garbage collection, type safe, strong typing, LINQ, closures and more. And having the freedom to use the same APIs from other languages like F#, IronRuby, IronPython, etc is going to be awesome as well.

I'm very impressed by it, the Packager works quite well as well, so far better than MacRuby imo. And the code completion in MonoDevelop works great.

Note. still requires you to have Xcode 3.2 installed for the InterfaceBuilder integration with MonoDevelop, they are working on Xcode4 support.
 

SidBala

macrumors 6502a
Jun 27, 2010
533
0
I used to be a hardcore C++ guy. When C# came along, I was very impressed. They have so many well documented libraries for everything. and LINQ just blew me away.

Been dev'ing on windows so far. Will give this a try.
 

ul1984

macrumors member
Original poster
Oct 3, 2008
30
0
Sweden
I used to be a hardcore C++ guy. When C# came along, I was very impressed. They have so many well documented libraries for everything. and LINQ just blew me away.

Been dev'ing on windows so far. Will give this a try.
Regarding docs, I noticed many classes/methods are unfortunately lacking docs in the MonoDevelop code completion. So I had to go on MSDN and read up on some stuff, but most of the time the method name and type signature seems to be good enough for understanding what the method if for.

I suppose the MSDN license doesn't allow them just copying the docs, hopefully it will get better in time as people contribute docs.

And I'd say MonoMac is even worse in that regard, but having used Cocoa before from ObjC it wasn't that bad.

I could see this being very nice if you want a good language for writing the backend/model/networking stuff of your app with, and still being able to have native looking UIs for all platforms: MonoMac on the Mac, maybe winforms(or the other one) on Windows, and probably gtk-sharp if you want a linux version as well.

And its compatible with the Mac App Store, supposedly one app written using it has already been accepted.
 

elppa

macrumors 68040
Nov 26, 2003
3,233
151
http://tirania.org/monomac/archive/2011/Mar-17.html

I find the C# language quite nice after playing it for a few days, I'm almost sorry to say but it kinda feels like a real language compared to ObjC: good garbage collection, type safe, strong typing, LINQ, closures and more.

You can write good, maintainable code in any language apart from Perl.

I wouldn't say having strong typing is a universal good.
 

iSee

macrumors 68040
Oct 25, 2004
3,539
272
As a long time hard-core C++ guy who has worked a lot with JavaScript in the last few years (i develop middleware where the most popular client language is JS) I have say, i was surprised how few problems weak typing causes. Basically none. Unit tests will always catch type errors so we don't really need the compiler to do it. At this point the only significant advantage to strong typing in my development environment is that it helps the compiler generate efficient code.
 

ul1984

macrumors member
Original poster
Oct 3, 2008
30
0
Sweden
elppa said:
You can write good, maintainable code in any language apart from Perl.

I wouldn't say having strong typing is a universal good.
As a long time hard-core C++ guy who has worked a lot with JavaScript in the last few years (i develop middleware where the most popular client language is JS) I have say, i was surprised how few problems weak typing causes. Basically none. Unit tests will always catch type errors so we don't really need the compiler to do it. At this point the only significant advantage to strong typing in my development environment is that it helps the compiler generate efficient code.
My mistake for calling it strong typing in the first post, but I ment static(as opposed to dynamic) typing. For example Python has dynamic, and strong typing, so these typing terms are not really on the same axis. (Not really sure if all of them have a good definition, that everyone agrees with)

But I agree its not all that important, I personally like dynamic typing as well(except for code completion trouble).

Still I like being able to use any .NET compatible language(and most pure .NET libraries) to write Mac apps, more choice is always good.


Mostly for me though, I like being able to write the whole app in C# for example, instead of having to dropdown* to C as soon as you need to do some real work. The mono VM and JIT may not be as good as the Microsoft one yet, and certainly not as good as the JVM, but its still fast enough for most stuff, around half the speed of C. This way you can still use your convenient collections, functional style programming (map/filter/fold (they have crazy** names in C# tho hehe)) and still keep a decent level of performance.

* When I was playing with some OpenGL programming a while back i started in pure ObjC, used NSArrays/NSDicts. etc, and an ObjC class to respresent the vectors as well. But with lots of vectors and some CPU based animation (lots of vector processing) it just got really slow. Had to switch over to structs for the vectors etc. (Later on I also tried some OpenGL in java, and it was definitely fast enough for my needs)

** "map" is called "Select" in C# for example
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.