Earlier quoted context omitted.
Really, "evil"?
Excess energy wasted = Unnecessary cognitive load * number of affected (readers + writers) * lifetime of Moonbit code * Calories per thought Tongue in cheek, yes, but I’m sure that if we can make this about contributing to climate change via energy consumption then there will be a sufficient group of folks ready to label it evil.
Moonbit: Fast, compact and user friendly language for WebAssembly
151–160 of 162 posts
Re: Moonbit: Fast, compact and user friendly language for WebAssembly
#152Earlier quoted context omitted.
I would strongly recommend to only go with one syntax, and not differentiate between regular functions and lambda statement
I disagree - allowing for type inference on the closures will make for a much more pleasant language, whereas requiring type annotations on top level functions makes sense for lots of reasons.
You can still have your type inference without forcing the unnecessary requirement that local functions be `fn` while top functions be `func`.
Re: Moonbit: Fast, compact and user friendly language for WebAssembly
#153Earlier quoted context omitted.
Yes, if the reference is immutable. The main problem with pointers is ad-hoc memory management anyway.
The references are not immutable in this case.
Back in the day, that was one of the major selling points of the new language Java over the more common C and C++. Developers don't learn about it nowadays because changing pointers is practically never done outside the most esoteric parts of system programming.
(*) Semantically, at least. The compiler is free to relocate the value to a different memory position in a way transparent to the programmer.
Re: Moonbit: Fast, compact and user friendly language for WebAssembly
#154Earlier quoted context omitted.
The references are not immutable in this case.
A reference, unlike a pointer, always points to the same memory address(*); so the reference is immutable even if the cell contents it points to are not. That's the difference between a reference and a pointer, by definition; not just the different syntax. Back in the day, that was one of the major selling points of the new language Java over the more common C and C++. Developers don't learn about it nowadays because…
Re: Moonbit: Fast, compact and user friendly language for WebAssembly
#155Having `func` keyword for a top function definition, but `fn` keyword for a nested function definition is evil. It should be either `func` or `fn` independently of a particular context.
Re: Moonbit: Fast, compact and user friendly language for WebAssembly
#156Earlier quoted context omitted.
I disagree - allowing for type inference on the closures will make for a much more pleasant language, whereas requiring type annotations on top level functions makes sense for lots of reasons.
> allowing for type inference on the closures You can still have your type inference without forcing the unnecessary requirement that local functions be `fn` while top functions be `func`.
Re: Moonbit: Fast, compact and user friendly language for WebAssembly
#157Suggestion. Rename from `func` to `fn` so it's more aligned with Rust.
Re: Moonbit: Fast, compact and user friendly language for WebAssembly
#158Earlier quoted context omitted.
I may also point to the image on the announce page is 4.7 MB.
The image size should be smaller now, it's about 200k, thanks for your feedback :)
Re: Moonbit: Fast, compact and user friendly language for WebAssembly
#159Earlier quoted context omitted.
I disagree - allowing for type inference on the closures will make for a much more pleasant language, whereas requiring type annotations on top level functions makes sense for lots of reasons.
> allowing for type inference on the closures You can still have your type inference without forcing the unnecessary requirement that local functions be `fn` while top functions be `func`.
Re: Moonbit: Fast, compact and user friendly language for WebAssembly
#160Hi, I am the lead of this project, you can try it now with our online IDE, https://try.moonbitlang.com (F5 to run) The docs are available https://github.com/moonbitlang/moonbit-docs , the compiler would be publicly available when we reach the beta status (expected to be the end of Q2 in 2024). Feel free to ask me any question
I think people would like to know about licenses, pricing, and control over the project. Perhaps your commercial strategy doesn't benefit from divulging that information now, but secrecy and uncertainty can kill interest.