Close

Functional Languages

A project log for enSweepen [gd0096]

Procedural and parametric, node-based CAD for 3D modelling with sketches.

kelvinakelvinA 03/01/2022 at 19:300 Comments

So I looked for languages better than C#, and I actually found a comprehensive review list and I discovered the benefits of functional languages. Looking through the syntax of F# made me more eager to program than I have been for a while, especially with the prospect of using Microsofts new MAUI with it. However, Higher Kinded Types are unfortunately not a feature, which essentially is being able to write parameterized code (you only need to write general code for multiple types instead of copy-pasting for every type you want to target). It's been asked in the F# and C# communities for years, so it seems that feature will never get into production. 

This entire project started because Fusion 360 brought out a new feature that allowed driven dimensions to be given a parameter, but they only worked in the same sketch. Autodesk said that an updated version would come Soon(tm), but that could be months, years

So I went on a tangent, looking at other FP languages such as Haskell, but after quickly researching alternative languages to C for embedded systems and finding none, I asked myself "Can I use any of these other languages to write an app for both Windows and Android?"

I feel like I read somewhere that F* (different from F#) had Higher Kinded Types, but I dismissed it as their website looked too old to still be in active development. However, I've just found https://github.com/FStarLang/FStar with a commit an hour ago, so obviously it's still alive, so I'll update the entry if I find something interesting.

Other than that, the nice and compact (but readable) syntax of F# already got my foot in the door, and many regard it as a great language that has less bugs post-compile to worry about, so I'll move forward with this language.

Discussions