4 ms·
Simplicity My ideal of simplicity is more like Haskell's than Clojure's. Clojure strives to be easy-to-use, but in the process, both the language and standard
by eduardoejp 11y ago
Simplicity
My ideal of simplicity is more like Haskell's than Clojure's.
Clojure strives to be easy-to-use, but in the process, both the language and standard library have evolved a lot of convoluted and often redundant code (you can take a look at the definition of map to get an idea: https://github.com/clojure/clojure/blob/028af0e0b271aa558ea4... https://github.com/clojure/clojure/blob/028af0e0b271aa558ea4...)
Haskell, on the other hand, is a very simple language that seeks simplicity at the library/API level.
Lux is more oriented towards that.
Portability
I code in Clojure and love the fact that I can work both on the JVM and on JavaScript. However, Clojure's current approach to portability lacks in several ways. I've seen other languages that compile to other platforms (like Scala & Haskell) and they all seem to have limited approaches.
I've come up with a new idea for how to approach the subject that should yield highly portable code that will be trivially reusable.
I've yet to add it to the compiler but it's gonna come in one of the upcoming releases.
Speed
Right now the code generated isn't being optimized in any way (it's v0.1 after all), but I've come with several ideas to make it fast and by the time I'm done, it will be faster than Clojure, and maybe Scala (I'm not sure about Scala, since I'm not a Scala dev and don't know how fast it is).
My goal with Lux is to get it as close to Java's speed as I possibly can.
Extensibility
Lux will allow people to access the compiler state in order to get useful information for macros. There is already a macro (using) that takes advantage of the typing information in the compiler to open up structs ala SML's open.
The pattern-matching macro is also open to extensibility and you can craft your own custom syntax to do crazy things with it.
The prelude (lux.lux) already comes with 2 such pattern-matching extensions.
- jonnybgood 11y agoIt sounds like you want Frege, no? https://github.com/Frege/frege https://github.com/Frege/frege
- eduardoejp 11y agoI wanted a Lisp, not just a functional language. I also wanted to push things forward in some aspects, like having the module system, first-class types & having higher interaction with the compiler. Also, Haskell & macros don't seem to mix so well, and meta-programming is a big deal for me.
- dllthomas 11y ago"Also, Haskell & macros don't seem to mix so well, and meta-programming is a big deal for me." With the ability to manipulate more of the components of your programs in regular code, macros become less important. But if you want to do compile-time metaprogramming in Haskell, Template Haskell is effective - typed or untyped.
- c3d 11y agoNever tell the creator of a language "It sounds like you want X". Creating a language is done a) for fun, b) just because, c) as a personal development plan, d) to explore, e) to become master of the universe. None of these is achieved by merely using language X, whatever the value of X is.