>>106569793
Not him but what I want is basically as close as I can get to Haskell except:
>No purity
>No implicit currying
>No laziness
>Stripped down standard library, common sense reduction of the number of types
>No GC
Same module system, type classes, GADTs, etc.
Built in polymorphic type Ptr, with a deriving list that looks like (Eq, Ord, Num, Integral, Bits, Nullable, ...)
C-style pointer arithmetic (obviously)
No pointer decaying, but the internal representation should still look like a pointer.
No need for monads, so steal <- from do-style syntax for pointer dereferencing.
A parametric allocate function that returns said Ptr type
A parametric reinterpret_cast function
Lambdas are fully supported, they only capture by value. At compile time, we check for which lexical values we are using and build a special product type based on them + a function pointer. Type checker ignores the product type, and checks against the function pointer. Storage of lambdas may require a built-in wrapper type, but that's fine.
If we want to capture a reference to a thing, it means capturing a pointer.
Absolutely NO STRICT ALIASING.
I think that gets us 98% of the way there.
>I do feel like the current syntax is more suited for a systems language where you need to be attentive to allocations etc.
I think it's more just about the semantics of the language. The ML-family gets close with the ref-type. But the lack of arithmetic + the whole lambda problem.