ballercat / walt

:zap: Walt is a JavaScript-like syntax for WebAssembly text format :zap:
https://ballercat.github.io/walt/
MIT License
4.64k stars 122 forks source link

Add corollary #183

Closed CrazyPython closed 5 years ago

CrazyPython commented 5 years ago

Don't re-invent existing tools. You should just learn D or Nim if you want to do WebAssembly. D/C/C++/Rust requires an awareness of the C memory model as well as the reasoning behind pass-by-value semantics (a pointer is simply a number that points to an 'index' in the memory, structs define a byte layout and what datatypes are where in that byte layout).

I'm saying this from someone who learned Python first, then tried C++ and scratched my head about it, then learned JavaScript, then truly understood C++.

D syntax in a nutshell:

return_type function_name(param_type param_name) {
  // always use semicolons
}
// use (f) { return 1 + 1 } instead of (f) => { return 1+ 1 }
// for pass-by-reference types use `class`
// use dmd while developing and ldc with -Os for shipping 
coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 410


Totals Coverage Status
Change from base Build 315: 0.0%
Covered Lines: 1977
Relevant Lines: 1977

💛 - Coveralls
JobLeonard commented 5 years ago

Did you notice the use of "I" in the preceeding paragraphs? What I'm getting at is that this commit is adding a paragraph to the motivation of ballercat to create this language. It's quite literally putting words into his mouth.