Live data from Hacker News

Why F#?

batsov.com

421–424 of 424 posts

Re: Why F#?

#421
post #404

Earlier quoted context omitted.

Dynamic typing can forbid the latter (at runtime), but it's implementation dependent. There's a further distinction, Latent typing , which is where types are associated with values rather than variables . But a dynamic language can have types associated with variables, and it can forbid changing those types after their types have been checked the first time.

> But a dynamic language can have types associated with variables, and it can forbid changing those types after their types have been checked the first time. So, like C++ with `auto`?

`auto` is still using static typing, and is a tool for type inference. A dynamically typed version might look equivalent but would behave differently, failing at runtime rather than compile time.

Re: Why F#?

#422

Earlier quoted context omitted.

You get speed of development, productivity, lots of libraries. You get something that is easy to learn and understand.

Lots of libraries if you want .NET, right? But if you don't, Rust has way more libraries Speed of development is debatable. I think you can be pretty fast with both. Easy to learn I concede but it gets easier with time, until it becomes very easy

Having written a moderately big project in OCaml which I tried porting to F# and later did port to Rust, to me Rust feels much faster to develop than either OCaml or F#, especially once you figure out the "core", adding more features is a breeze. Refactoring is also easier. Not to mention that reading Rust is much easier than reading OCaml and coming back to the project after a year feels very easy. I think that I have less bugs with Rust than with OCaml. And the end product's core ended up being ~3-4 times faster to execute in Rust.

Re: Why F#?

#423

Earlier quoted context omitted.

Isn't Clojure similarly (or even moreso) multiparadigm?

i don't think it is. i would say it is functional + bridges to the jvm (which is why it has been ported to many other platforms... there is not that much stuff in the language itself). it is functional (value) programming first. there are tools to hook in the object jvm stuff but this is not the natural grain of the language. clojure is pretty much all values and functions (and some macroes). + some concurrency stuff…

I mean to each their own, but a quick search of "clojure multiparadigm" comes up with a fair number of hits from people who would disagree with it not being so.

Re: Why F#?

#424
post #350

Earlier quoted context omitted.

The real evil option is C: 2+"22" = 0, 4+"4" = undefined behavior and probably the value of some other variable.

I think you meant: "22"+2 = "", and it is not UB to make the second pointer, only to use it

The pointer arithmetic works both ways, same as square brackets.
Post reply on HN