Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

F#

Name: Anonymous 2008-04-21 21:11

So anyway I have begun my foray into F#.  Because I plan to use .net in my next project I think it will be fun to learn F# in addition to C# and use both languges in the project.  To this end I just ordered Expert F#.  Knowing /prog/ is infinitely more expert then me: 

what does /prog/ think about .net?
what does /prog/ think about F# (ocaml)?
What type of tasks are better to be performed in F# vs C# (Math type tasks heavy)?

Name: Anonymous 2008-04-23 21:08

>>56

Assuming you understand generics...

In Java, a generic just takes the object in and boxes it to the type object. When you then reference the object in the generic, it then unboxes it from object to the type you expect.

Lets imagine you are using a generic class as a collection, a very popular and useful thing to do. As you populate the collection you incur those extra instructions boxing to object. Now if I iterate over the collection, I incur the unboxing instructions for each object.

Lets say I need to populate a collection with 100 items.
Then iterate over that collection and change the value of each item.
Then later persist the collection to a database or some other medium.

I have just incurred 300 sets of boxing and unboxing instructions for a very simple task.

This is odd because generics are normally implemented to avoid this sort of thing.

C++ and .Net don't do this. The value of each item always remains as the type you specified in your type parameter.

As for the ACM, I mean real as in they do not serve the interest of any group such as Sun or MS. It's as good as your gonna get for peer reviewed studies in computer science.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List