If you already know LISP, why would you also want

2019-02-05 03:18发布

What is the added value for learning F# when you are already familiar with LISP?

11条回答
放荡不羁爱自由
2楼-- · 2019-02-05 03:55

One way to look at this (the original question) is to match up the language (and associated tools and platforms) to the immediate task. If the task requires an overwhelming percentage of .NET code, and it would require less shoe-horning in one language than another to meet the task head-on, then take the path of least resistance (F#). If you don't need .NET capabilities, and you're comfortable working with LISP and there's no arm-bending to move away from it, keep using it.

Not really much different from comparing a hammer with a wrench. Pick the tool that fits the job most effectively. Trying to pick a tool that's objectively "best" is nonsense. And in any case, in 20 years, all of the currently "hot" languages might be outdated anyway.

查看更多
我想做一个坏孩纸
3楼-- · 2019-02-05 03:57

Money. F# code is already more valuable than Lisp code and this gap will widen very rapidly as F# sees widespread adoption.

In other words, you have a much better chance of earning a stable income using F# than using Lisp.

Cheers, Jon Harrop.

查看更多
Luminary・发光体
4楼-- · 2019-02-05 04:05

F# is a very different language compared to most Lisp dialects. So F# gives you a very different angle of programming - an angle that you won't learn from Lisp. Most Lisp dialects are best used for incremental, interactive development of symbolic software. At the same time most Lisp dialects are not Functional Programming Languages, but more like multi-paradigm languages - with different dialects placing different weight on supporting FPL features (free of side effects, immutable data structures, algebraic data types, ...). Thus most Lisp dialects either lack static typing or don't put much emphasis on it.

So, if you know some Lisp dialect, then learning F# can make a lot of sense. Just don't think that much of your Lisp knowledge applies to F#, since F# is a very different language. As much as an imperative programming used to C or Java needs to unlearn some ideas when learning Lisp, one also needs to unlearn Lisp habits (no types, side effects, macros, ...) when using F#. F# is also driven by Microsoft and taking advantage of the .net framework.

查看更多
戒情不戒烟
5楼-- · 2019-02-05 04:08

If I were switching from Lisp to F#, it would be solely because I had a task on my hands that hugely benefitted from some .NET-only library.

But I don't, so I'm not.

查看更多
狗以群分
6楼-- · 2019-02-05 04:08

I'm not sure if you would? If you find F# interesting that would be a reason. If you work requires it, it would be a reason. If you think it would make you more productive or bring you added value over your current knowledge, that would be a reason.

But if you don't find F# interesting, your work doesn't require it and you don't think it would make you more productive or bring you added value, then why would you?

If the question on the other hand is what F# gives that lisp don't, then type inference, pattern matching and integration with the rest of the .NET framework should be considered.

查看更多
登录 后发表回答