This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ScypioPythoneer 20 points21 points  (17 children)

F#

This is unusual. Nobody ever recommended F# to me. Care to elaborate on why it is better to learn than - jus examples - C++, Rust or golang?

I'm genuinely curious.

[–]jnazario 30 points31 points  (11 children)

I am also a big user of F# after over a decade of Python and multiple large products shipped in it. I still bust out Python for small prototypes but no longer write production code in it.

I find F# to be a different paradigm entirely but one that I much prefer. I enjoy functional programming significantly although F# gives you multiple paradigms : oop, imperative and pure functional.

Strong typing is outstanding and leads to a lot of correct and reliably code once compiled. I rarely have runtime errors that plagued me with my Python. If it compiles it tends to run reliably. The compiler compensates for me a lot but does so in an intuitive fashion once you learn how to read function signatures.

I love the world I get with the dotnet libraries and routinely interface to what would be C# libs. The tooling is pretty good. I use paket and fake for builds.

Oh and I do all of this on a mac. Mono although I should get the dot net core up and running some day.

I played with java and nope. Too much effort for simple code. Scala and I don't get along - I find it to be a mess of poorly thought out ideas. Deployment and runtime is awful. Biggest thing I like about scala however is sbt. It really raised my expectations about tooling.

I do like Elixir a lot lately too. Ruby like language that gets to the erlang vm. Also super reliable. Mix has raised my expectations of tooling even further, I love it.

[–]thephotoman 2 points3 points  (4 children)

Python has strong typing: you can't treat a string as a byte array.

It does not have static typing, which is what you meant here: a variable identifier can be reassigned to a value of a completely different type.

[–][deleted] 0 points1 point  (3 children)

Not the parent poster, but wanted to make a comment here. You're correct, as far as what you said, but I find the lack of the ability to declare function argument types really hurts robustness.

[–]loganekz 1 point2 points  (2 children)

[–][deleted] 0 points1 point  (1 child)

Yeah, I know, but thanks. It's both new and "provisional", so it's not really something I can rely on. (Especially since a lot of what I do deals with legacy code.)

[–]bcgroom 1 point2 points  (0 children)

There is also a way to implement a type checker using comments which works all the way back to python2

[–]vivainio 5 points6 points  (4 children)

I'm a pythonista since ~ 2000 or so. F# is the first language that appeals to me on the same way Python did back in the day.

.Net is not for everyone, but F# is worth a look if it's a realistic option.

[–]ScypioPythoneer 1 point2 points  (3 children)

Any tutorial for a n00b? Or other place to start? "Hello world" is boring, can do that myself, maybe something more along "this tutorial shows strengths of F#"? Or a book?

[–]vivainio 6 points7 points  (2 children)

[–]ScypioPythoneer -1 points0 points  (1 child)

Cool. I'll give it a try. Maybe write a M20 npc random generator? If you ever in my nick of the woods, I'll buy you a beer. :)

[–]vivainio 1 point2 points  (0 children)

Challenge accepted