Live data from Hacker News

Fable: F# to JavaScript compiler

fable.io

31–40 of 74 posts

Re: Fable: F# to JavaScript compiler

#31
post #28

Earlier quoted context omitted.

Nothing is being moved. UWP has been here since the dawn of Windows 10, which evolved from WinRT, going back to Windows 8, and is constantly being extended with new APIs.

I guess I don't understand... you've only written apps targeting UWP since what year? And previous experience was with what? It's nice when you're where the cheese is currently at, that's not what I'm talking about though. I do hope for your sake you don't wind up in the next lifeboat after the Silverlight crew, I really genuinely do. Good luck!

I've been holding of targeting UWP, until proper F# support.

I have experience with plenty of languages and technologies, including C, C++, Rust, Scala, OCaml, Haskell, Clojure, Elm, Idris, WinForms, WPF, DirectX and dabbled with Silverlight. Migrating from WPF or Silverlight towards UWP shouldn't be a problem.

F# has been my favorite language since 2008, but the hostile anti-UWP, anti-Windows community, compounded with the lack of abstraction features such as ML functors, higher-kinded types, type-classes and terrible modern Windows client support, are driving me away from it.

UWP is pretty mature now and all modern default 1st party Windows apps and critical UI components such as start menu, action center and settings rely on it, and more is being migrated towards it all the time, there is no sign of UWP going away anytime soon.

Re: Fable: F# to JavaScript compiler

#32
post #28

Earlier quoted context omitted.

I guess I don't understand... you've only written apps targeting UWP since what year? And previous experience was with what? It's nice when you're where the cheese is currently at, that's not what I'm talking about though. I do hope for your sake you don't wind up in the next lifeboat after the Silverlight crew, I really genuinely do. Good luck!

I've been holding of targeting UWP, until proper F# support. I have experience with plenty of languages and technologies, including C, C++, Rust, Scala, OCaml, Haskell, Clojure, Elm, Idris, WinForms, WPF, DirectX and dabbled with Silverlight. Migrating from WPF or Silverlight towards UWP shouldn't be a problem. F# has been my favorite language since 2008, but the hostile anti-UWP, anti-Windows community, compounded w…

> there is no sign of UWP going away anytime soon

Except for Windows Phone getting killed, which was the _main_ device type for UWP. The Windows app store is the same graveyard that it was in late 2015 when the announcements around new Windows Phones piqued my curiosity. It looks like that's simply not a thing anymore. I'm betting my money on Xamarin and the browser for a client application, not UWP. There's just no point to it.

Re: Fable: F# to JavaScript compiler

#33

Why not show a code sample on the homepage? None of Home, Docs, or Samples have a single code snippet on the entire page, you have to click through. Crystal and Rust are good examples of language homepages that give you an idea of what you're getting into up front. Or for a transpiled language, PureScript.

I actually agree. Showing an example of something that is hard and common in JavaScript but easy in F# would help justify using this.

Re: Fable: F# to JavaScript compiler

#34

Earlier quoted context omitted.

I've been holding of targeting UWP, until proper F# support. I have experience with plenty of languages and technologies, including C, C++, Rust, Scala, OCaml, Haskell, Clojure, Elm, Idris, WinForms, WPF, DirectX and dabbled with Silverlight. Migrating from WPF or Silverlight towards UWP shouldn't be a problem. F# has been my favorite language since 2008, but the hostile anti-UWP, anti-Windows community, compounded w…

> there is no sign of UWP going away anytime soon Except for Windows Phone getting killed, which was the _main_ device type for UWP. The Windows app store is the same graveyard that it was in late 2015 when the announcements around new Windows Phones piqued my curiosity. It looks like that's simply not a thing anymore. I'm betting my money on Xamarin and the browser for a client application, not UWP. There's just no…

The main device type for UWP is any Windows 10 device. See the list of benefits mentioned in the link above, which extend beyond phones. I've never owned a Windows Phone, yet I always prefer UWP apps.

Also there is a big market for 2-in-1 tablets, and new small Windows on ARM devices are coming out very soon.

http://www.zdnet.com/article/microsoft-to-pc-makers-lets-mak...

Not every kind of client app is suitable for the browser, especially if you care about performance and deep native platform integration. And I'd rather not deal with JS frameworks when not targeting the web.

Re: Fable: F# to JavaScript compiler

#35

Why not show a code sample on the homepage? None of Home, Docs, or Samples have a single code snippet on the entire page, you have to click through. Crystal and Rust are good examples of language homepages that give you an idea of what you're getting into up front. Or for a transpiled language, PureScript.

you can go to the samples... but you will quickly notice a lot of the samples are canvas orineted things, because Fable gets to be in control to do things F# like. There's a vue and react example, but the code doesn't show any real advantage. Very little examples of typical web pages.... just a link to fable-elmish..... so... you may as well use elm. This is a common problem for F# in general, it hasn't really carved a slice of a world where it dominates. It's a nice language, but hard to make it a first choice.

Though one area I think it's quite nice is parsing, I like FParsec

Re: Fable: F# to JavaScript compiler

#36
post #2

The first thing I worry about reading something like this is how leaky the abstraction will be. I would love to ditch JavaScript for pretty much anything else but if I need to think about the JavaScript part anyway because of certain things that I can or cannot do I prefer to think in JavaScript from the get go.

This is a tricky one. If the abstractions were not leaky, you would not be able to interoperate with JavaScript libraries and you'd have to reimplement everything that powers the modern JS ecosystem. On the other hand, if the abstractions were too leaky, you'd lose all benefits of a nice language like F#. I think Fable strikes the right balance. There are some leaky aspects of how it compiles to JS, but this means th…

> you can just cast JSON object to F# records and it'll work

Isn't a "JSON object" just a string?

Re: Fable: F# to JavaScript compiler

#37
post #3

great! now we just need more than two people that know f#. i keed...kinda ;)

Sssh. Speaking as one of the two people who know F#, I'd be very sad if others learned about it. It's my secret weapon that lets me solve problems that would otherwise take me weeks in a matter of days.

People have also said that about Lisp, TCL, and Haskell.

It's all true ;) Enjoy the sharp!

Re: Fable: F# to JavaScript compiler

#38

Earlier quoted context omitted.

This is exactly why I standardised on TypeScript. Their isn't actually much of an abstraction in one direction, valid ES6 is valid TS and the types are inter-operable. Throw in better typing, proper classes, down compiling of async/await to ES3/ES5 (still magic to me) and the ability to progressively port from one to the other (and you can even get a lot of the TS benefits just by annotating your existing JS as a goo…

I have to agree, the pragmatic and thoughtful approach that the TS team has brought to the language makes it reasonable to write in and easy enough to reason about at any given time. Plus, being a superset means that if you want to 'drop into' JS to take advantage of some quirk or whatever at any time, you can just disable your linter and do the deed. Coming from a C# and Python fan, TS hits the mark pretty solidly o…

> Plus, being a superset means that if you want to 'drop into' JS to take advantage of some quirk or whatever at any time, you can just disable your linter and do the deed.

This is an exact example of what GP was talking about with leaky abstractions though. You don't have to just learn TS to use TS, you need to learn TS and JS.

IMO a proper, strict typed language; and plain Javascript; are both much better options than TS.

Re: Fable: F# to JavaScript compiler

#39
post #3

great! now we just need more than two people that know f#. i keed...kinda ;)

That would require Microsoft, the F# team, and the vocal F# community members to actually want F# to be a proper first-class .NET citizen, which sadly isn't the case. https://np.reddit.com/r/fsharp/comments/6tdrwq/after_so_many...

Mads Torgerson (the head of the Roslyn project; C#/VB Compiler) showed once a slide, that c# devs are counted in millions, VB devs in 100k steps and F# devs in 10k steps.

F# is a wonderful thing for the ecosystem, but practically of no importance regards priorities.

IMHO: To make UWP and F# a thing, UWP need to be remodeled to a primary react like system. That however will never be a story, considering the state driven UI development MS is doing for decades.

Re: Fable: F# to JavaScript compiler

#40
post #38

Earlier quoted context omitted.

I have to agree, the pragmatic and thoughtful approach that the TS team has brought to the language makes it reasonable to write in and easy enough to reason about at any given time. Plus, being a superset means that if you want to 'drop into' JS to take advantage of some quirk or whatever at any time, you can just disable your linter and do the deed. Coming from a C# and Python fan, TS hits the mark pretty solidly o…

> Plus, being a superset means that if you want to 'drop into' JS to take advantage of some quirk or whatever at any time, you can just disable your linter and do the deed. This is an exact example of what GP was talking about with leaky abstractions though. You don't have to just learn TS to use TS, you need to learn TS and JS. IMO a proper, strict typed language; and plain Javascript; are both much better options t…

> You don't have to just learn TS to use TS, you need to learn TS and JS.

I don't understand this. TypeScript is not a different language. It's just JavaScript with some type annotations. If you had never used JavaScript before and learned TypeScript you could immediately write plain JavaScript as well.

Post reply on HN