News for hackers. Stuff that matters.
Re:Ask HN: What do you think of F#? by natch on Sunday October 24, 2010 @01:37PM (#1826638)
This is a bit of an off-topic rant, so feel free to skip it if you would prefer a direct answer to the question.

For many years I've made it a point to studiously ignore languages that come out of Microsoft, having been burned too many times by their constantly shifting and sometimes suddenly-expensive tools. Before anyone mentions price, sometimes the expense is hidden in places like what system I would have to run, with what total cost of ownership, in order to use their stuff. There may have been some unknown opportunity costs to me, but I am blissfully unaware of these and have had plenty of other fun languages to use.

Re:Ask HN: What do you think of F#? by fiveo on Sunday October 24, 2010 @03:07PM (#1826910)
Hear hear.

I think it's fine to use MS stuffs for fun, hobby, side project, or even some consulting jobs (if money is good and the task is not that hard).

For me personally, I'm trying to move away from languages that requires heavy-weight tooling because I'm seeing a pattern where most people whom I consider to "know their stuff very well and can do great things" seem to come from Open Source background. They do stuff with C, *NIX, Python, Ruby, Perl, JavaScript, and various other small tools that do great things.

Just a personal observation nonetheless.

Re:Ask HN: What do you think of F#? by j_baker on Sunday October 24, 2010 @09:02PM (#1827935)
You have got to be the first person I've ever heard say that MS products are ok for side projects, but that free stuff is better for business. In general, I would associate MS with "businessy" and open source with "fun".
Re:Ask HN: What do you think of F#? by fiveo on Sunday October 24, 2010 @10:35PM (#1828221)
That depends on what kind of business (or ways to make money) we're talking about here.

For example, there are many web startups and web consulting companies that use typical LAMP stack or "light-weight" Java stack (Spring -IoC,AOP,MVC-, Hibernate/iBatis, Ant/Mavent, Hudson, MySQL/PostgreSQL).

There are also other types of work that would require heavy help from the open source tools. One such example is embedded development. My friend works at Broadcom and he uses gcc, vim, ctags on day to day base. I'm sure companies that operate in hardware, system, and, network fields are also using open source tools heavily.

The Russian developer, who used to work at Goldman Sach and got caught sending his work to some server, used a mix of Erlang, C++, and various other tools as well so I'm guessing those big guns at Wall Streets are using open source tools for their HF trading systems.

Then there are your typical insurance companies, your typical hospitals, your typical small businesses, your typical banks, your typical grocery stores that would swear by Microsoft technology for their internal apps.

I'm not trying to say that Microsoft is not suitable for "serious businesses". I'm looking at the trend around me and it seems that Microsoft technology appears in places where people need something quick to be done and would never add major features, instead just bug fixes and small polish here and there.

Re:Ask HN: What do you think of F#? by rlmw on Sunday October 24, 2010 @02:00PM (#1826714)
I can appreciate some of these concerns - though the ability to run under mono ameliorates them for me. If you want a language aiming for a similar functional + oop position but don't want to touch Microsoft stuff then Scala might be worth taking a look. Thats assuming you don't extend your fears to Java Virtual Machines as well.
Re:Ask HN: What do you think of F#? by StavrosK on Sunday October 24, 2010 @02:59PM (#1826892)
How does Clojure compare with these? It's time I learnt a functional language...
Re:Ask HN: What do you think of F#? by kgo on Sunday October 24, 2010 @03:47PM (#1827036)
You can break functional languages down into two basic categories: Typed and Untyped. The typed ones derive from ML, and the untyped ones derive from Lisp.

Many of the 'killer features' of untyped functional languages have migrated their way into today's 'dynamic' languages like ruby, python, etc. You can use a REPL, you don't need to spend 15 minutes compiling, no static typing, etc. So in terms of 'new' things you'll learn from Clojure, you have s-exps and macros. This allows you to manipulate code as data, because the code is data.

The typed functional languages have an advanced type system, as the name indicates. In 'normal' languages, you have what I casually refer to as 'primitive types' Integers, Floats, Doubles, etc, and after that you're on your own. Typed functional languages have ADT's that allow you to model complicated systems via the types. Probably the standard example of a real-life use of this is that you can write code that will throw an error at compile time if you try to inadvertently try to add Feet and Meters. They also have pattern matching, which is pretty handy. Imagine a big if-elsif statement that will throw a compile time error if you handle bank transfers up to a million dollars, and transfers over two million dollars, but not ones that are between one and two-million dollars. You can think of both of these features as typedefs and case/if-elsif statements on crack. That's the kind of stuff you'll get from F#.

I personally think the typed functional languages have much more compelling features in this day and age. Like I said above, the features that I really dug in Lisps have made their way into most dynamic languages, and don't seem as mind-blowing as they once did. But if you really want to go crazy, it's probably worth learning at least one language from each functional sub-family at some point in time.

Re:Ask HN: What do you think of F#? by StavrosK on Sunday October 24, 2010 @03:50PM (#1827046)
Ah, that's very interesting, thank you. I assume Scala is typed, then?
Re:Ask HN: What do you think of F#? by kgo on Sunday October 24, 2010 @04:07PM (#1827107)
Scala's...

weird...

Scala would fall under the typed functional family. It has it's own version of ADT's and it has pattern matching. But in a lot of ways it's a hybrid OO/Functional language. A lot of the decisions in the language's design were made so that it'd play nice with Java-proper.

My initial superficial feelings about it was that it combined the worst of both worlds. It had all the popularity of a functional language, and all the nice syntax of Java.

Since then I've started writing a Droid app to get a real feel for the language, and all my superficial feelings were wrong. I like the language a lot. But it's still a little weird compared to all the other typed functional languages. You can't see as much ML in Scala as you can in F# or even Haskell.

Still, if you're stuck (or prefer) the JVM, then that's probably the typed functional language you'd want to try. That's the reason I'm using it for Droid development.

Re:Ask HN: What do you think of F#? by StavrosK on Sunday October 24, 2010 @04:31PM (#1827172)
Thanks for that. The apps run on Android? I thought Dalvik only supported Java... Or is there a Scala -> Java compiler (or Java bytecode -> Dalvik bytecode, for that matter)?
Re:Ask HN: What do you think of F#? by pufuwozu on Sunday October 24, 2010 @06:47PM (#1827579)
dex is an executable that comes with the SDK and converts files from .class (Java bytecode) to .dex (Dalvik bytecode)

For a while there was a bug in the Dalvik VM that wouldn't let you run some Scala methods but I made a patch to fix that problem. I think it's in all releases after Android 1.6.

Re:Ask HN: What do you think of F#? by StavrosK on Sunday October 24, 2010 @07:01PM (#1827619)
Ah, I see, fantastic. I thought it compiled the code into .dex. I imagine it might run Jython as well, then?

EDIT: Apparently Jython uses on-the-fly bytecode generation on account of being dynamic, so it can't run.

Re:Ask HN: What do you think of F#? by pufuwozu on Sunday October 24, 2010 @07:08PM (#1827635)
The Android Scripting project adds support for Python, Perl, JRuby, Lua, BeanShell, JavaScript and Tcl:

http://code.google.com/p/android-scripting/

Re:Ask HN: What do you think of F#? by rbxbx on Sunday October 24, 2010 @09:53PM (#1828080)
http://www.mirah.org/ (formerly Duby) is another compelling candidate for Android development for those that like Ruby. Compiles to Java byte-code :)
Re:Ask HN: What do you think of F#? by StavrosK on Sunday October 24, 2010 @07:18PM (#1827660)
That's very handy, thank you!
Re:Ask HN: What do you think of F#? by whakojacko on Sunday October 24, 2010 @03:57PM (#1827073)
If by typed I assume you mean "statically typed", then yes.
Re:Ask HN: What do you think of F#? by gaius on Sunday October 24, 2010 @01:39PM (#1826647)
F# is free. http://www.microsoft.com/downloads/en/details.aspx?FamilyID=... . You only pay if you need the fancy "enterprise" features.
Re:Ask HN: What do you think of F#? by InclinedPlane on Sunday October 24, 2010 @06:43PM (#1827570)
For SaaS, using MS technologies requires careful cost analysis. Putting MS server software on your hardware will raise the price per system by many hundreds of dollars, double that if you are also using MS SQL Server. Even if F# is free, building a platform that relies on F# could potentially be very expensive.
Re:Ask HN: What do you think of F#? by gcampbell on Sunday October 24, 2010 @01:43PM (#1826661)
I didn't see a Visual F# Express there - does Visual C# Express include IntelliSense for F#?
Re:Ask HN: What do you think of F#? by gaius on Sunday October 24, 2010 @01:56PM (#1826703)
Download the VS 2010 redistributable shell and then the F# MSI.
Re:Ask HN: What do you think of F#? by tomasp on Sunday October 24, 2010 @05:21PM (#1827331)
See also http://fsxplat.codeplex.com, which is a project with the aim to make F# a better tool for cross-platform development. I'm currently working on an (open source) MonoDevelop integration for F# (sources are already there), but an announcement is yet to come...
Re:Ask HN: What do you think of F#? by Devilboy on Sunday October 24, 2010 @05:19PM (#1827325)
Intellisense and debugging on one of the nicest IDEs around FOR FREE. Say what you want but Microsoft looks after developers.
Re:Ask HN: What do you think of F#? by tzs on Sunday October 24, 2010 @10:53PM (#1828265)
> For many years I've made it a point to studiously ignore languages that come out of Microsoft, having been burned too many times by their constantly shifting and sometimes suddenly-expensive tools.

Examples?