Better HN
topnewbestaskshowjobs
Log inSign up

pd-andy

52 karma · joined Apr 9, 2020 (6y ago) · 12 submissions

Submissions

comment 5y ago · link · parent

Oh yeah I knew I was forgetting one, F#/Fable seems really popular among F# devs, but it doesn't seem like it's picking up any traction for FE devs that aren't already in that community.

Typescript encourages and is generally more conducive to a different style of programming. That's OK (in fact, clearly it's more than OK given its popularity) but it's not really the sort of thing I want to be writing. I think it's worse if you commit to something like fp-ts or the fantasyland stuff, personally.

comment 5y ago · link · parent

Lumi: https://twitter.com/hdgarrood/status/1412833319348314121

comment 5y ago · link · parent

I think the project is a while off of being properly usable. I think it's mostly written with Node in mind, but shouldn't be too difficult to swap out the Fs bits for browser-specific code.

comment 5y ago · link · parent

The compiler written in Haskell relies on some extensions and/or optimisation tricks that make it not possible to compile with GHCJS. The 0.18 compiler (or maybe it was 0.17) was compiled with it though, it was what Ellie (third-party online playground) used.

comment 5y ago · link · parent

Neither, really. I'd say it has the largest community out of the various compile-to-js statically typed FP langs, at least with an explicit front-end focus.

- PureScript has a small but passionate community, one of the biggest players in that community laid off their whole ps team so that doesn't bode well.

- ReasonML fractured into ReScript but left half the Reason community behind, it's a confusing space to navigate now.

- GHCJS...

Most (perhaps even all) of the job postings end up on the elm slack (rather than, say, reddit or other more visible places).

There was some controversy with the release of 0.19 a couple of years ago, and general contempt (in the wider community, not inside Elm) for the way the language is developed and run which means there isn't a great deal of buzz about it outside of those already using it.

comment 5y ago · link · parent

Ha yes, very true!

comment 5y ago · link · parent

As far as I know those two are equivalent. Definitely slightly clunkier, but is what it is.

comment 5y ago · link · parent

Not quite. I guess in some ways phantom types achieve the opposite of structural typing.

In a language with structural typing, two types are considered equivalent if they share the same structure. With phantom types we can have a single structure and disambiguate between different uses without touching the underling structure. There's no difference between Id(User) and Id(Post) at runtime, the annotation is purely a compile-time restraint.

In fact, because of typescript's structural typing, the only way to use phantom types in ts is to have some dummy field of type `never` that the type system can use to disambiguate between the two [1].

[1]: https://gist.github.com/GoNZooo/243b23702df1fae38c966ae18832...

comment 5y ago · link · parent

Using phantom types in state machine transitions is really cool, yeah. I came across a little gist that explored that idea in Elm [1] the other day, actually.

[1]: https://gist.github.com/rupertlssmith/88946c8d207d7ad64daf43...

10.

Phantom Types in Gleam(blog.pd-andy.dev ↗)

35 points · by pd-andy · 5y ago · 11 comments

comment 6y ago · link · parent

> The people who write these "I'm leaving X" posts must know they have disproportional power in such a tiny pond.

This is what I find so disappointing and likely why many "thin-skinned" users come out to defend the language when posts like this come out.

comment 6y ago · link · parent

Because every single one of these posts is "I like Elm, I don't like Evan('s style of leadership)."

All of these leavers could've maintained that fabled community fork they want with the features they want if they all got together.