Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is F# to IronPython/IronRuby as C# is to VB.NET?

I just listened to podcast of Chris Smith talking about F# in which he talks about how F# is a language which allows you to approach problems in a different way than in C#/VB.NET, i.e. instead of "pushing bits around" you "chain together data transformations", and that how F# will "become like XML", something that you use in addition to your language of choice (C# or VB.NET) in order to solve certain problems in a more efficient way.

This got me to thinking about the relationship of the .NET languages, here's how I understand them:

  • C# and VB.NET are syntactically but not substantially different, i.e. a C# programmer would not learn VB.NET in order to "approach problems in a new way"
  • however, a C# or VB.NET programmer would learn F# in order to "approach programming problems in a functional way"

But what about IronPython and IronRuby? Chris mentioned that "F# learned a lot from Ruby and Python" so I would think that F# has a similar relationship to IronRuby/IronPython and C# has to VB.NET. However, a little googling around tells me that IronRuby and IronPython are both built on the DLR but F# is not.

How are the relationships between F#, IronRuby and IronPython to be best understood?

like image 938
Edward Tanguay Avatar asked Jun 10 '09 19:06

Edward Tanguay


People also ask

How Fast is Lexus IS F?

Experience the ferocious roar of a naturally aspirated 5.0-liter V8 engine amplified by stacked quad exhaust tips. The IS 500 F SPORT Performance boasts a full 472 horsepower* at 7,100 rpm and 395 lb-ft of peak torque* at 4,800 rpm. And a blistering 0-to-60 time of just 4.4 seconds* . The result?

How much does a Lexus IS F cost?

2022 Lexus IS 500 F Sport Performance Priced at $56,500 - Kelley Blue Book.

Will there be a Lexus IS F?

Lexus has moved away from V8 engines in most of its other vehicles, including the LX, and the LC is unlikely to get a high-performance F variant. That said, the IS 500 gets us 80% of the way to a full-fat F car, so it's not like Lexus has a long way to go. The IS F is apparently due to arrive in Japan in October 2022.

Is ISF a good car?

The Lexus IS F is great fun on open roads. The big V8 delivers lots of power and is accompanied by a glorious exhaust note, and while the IS F isn't as composed as a BMW M3 in corners, that only adds to its appeal. Another highlight is the eight-speed automatic gearbox.


3 Answers

F# and IronPython/IronRuby are light years apart from a language perspective. F# is a functional, highly typed compiled language. IronRuby/IronPython are dynamically typed, interpreted languages.

I believe IronPython does additionally support compilation but I'm not 100% sure, and less about ruby.

The relationship between VB.Net and C# is much closer.

like image 78
JaredPar Avatar answered Sep 22 '22 01:09

JaredPar


In many ways F# and Ruby/Python are superficially similar. All three languages allow you to concisely express ideas without littering your code with many types. However, F# is actually very different from Ruby and Python, since F# is a statically typed language, while Ruby and Python are dynamically typed. Idiomatic F# code rarely mentions types, but the compiler infers types and any type errors will be flagged by the compiler during compilation. For Ruby and Python, using a value at the wrong type will only generate errors at run-time. Ruby and Python’s dynamism means that both are more amenable to metaprogramming than F# is (types can be modified at runtime, for instance). On the other hand, F# is going to be more performant for most tasks (comparable to C#), and offers many nice functional abstractions such as discriminated unions with pattern matching. It’s certainly true that learning any of these languages well will lead you to think about problems differently than you do in C# or VB.NET, but your approach will probably vary a lot between F# and Python/Ruby as well.

like image 39
kvb Avatar answered Sep 21 '22 01:09

kvb


I'd say F# learned a whole lot more from OCaml than it did from Ruby and Python combined. The only real comparison is that F# is brings ML to .NET in the same way that IronPython/Ruby bring Python/Ruby to .NET.

like image 43
Niki Yoshiuchi Avatar answered Sep 19 '22 01:09

Niki Yoshiuchi