@axelbd:
Glad we see it the same; as I said, my main regret with Gren is that it splits from being backward compatible with Elm so any that make the switch from Elm to Gren are going to have to refactor their packages and code.
Lately, I’ve been considering four major things that would affect ElmPlus:
- Whether it should have the most requested feature of Type Classes/Abilities: I don’t see that this is yet proposed for Gren; Ability’s are a limited feature of the Roc language with no Higher Kinded Type’s (HKT’s) meaning it can never have Mappable, MultiMapable, and Chainable (equivalent to Functor’s, Applicative’s, and Monad’s in Haskell/PureScript). So I guess if HKT’s were offered, it would be something that might cause some to choose ElmPlus over those others if they consider that feature particularly desirable. However, adding the complexity of HKT’s would only eliminate the boilerplate for the multitude of
map
,mapN
andandThen
functions of which there aren’t all that many, but would also permit a more general use of “do notation sugar” which could be more useful. None of these are absolutely essential, so I guess the decision to include them cam be deferred. Adding just Ability’s is quite useful as it allows a more general constraint system: for instance, if one were to add aiteratable
constraint which would include those Type’s that includefilter
,foldl
andfoldr
functions, using Elm’s current constraint system, one would then need to addcomiter
for those Type’s that are bothcomparable
anditerable
unless one were to expand the meaning ofiterable
to also includeappendable
and make all Type’s that areiterable
include all Type’s that are currentlyappendable
but also Type’s such asDict a
,Set a
,Array a
, etc. Then one has Abilities such ashashable
,encodable
anddecodable
that give equivalent problems with the current Elm constraint system if one needed these to be combined with other constraints such ascomparable
… - Whether the ability to generate one’s own operators should be as restricted as it is in Elm…
- Whether to restrict the use of the Foreign Function Interface (FFI) for generating web pages as much as it is in Elm in the interests of “no run time error’s in practice”…
- For me, if the new ElmPlus language doesn’t offer performance comparable to C, I’m not all that much interested in completing it. In the interests of checking whether it should give good performance, I’ve been writing C code that should resemble what the new compiler is able to generate. So far, it looks like even with bounds checking, the code generator should produce code that is about the same speed as Rust with bounds checks as long as Custom Type’s are used with pointers to the stack (rather than the heap) where possible. The code should be as fast as C for the same algorithm when UnsafePointer’s including pointer arithmetic and unsafe mutation on store’s (without bounds checking) are used (when allowed, which is a question), which UnsafePointer’s will be necessary anyway if there is to be FFI with C code…
Including any of these features in ElmPlus need not break backward compatibility with Elm…
Please chip in if any of you have ideas on these…