Replies: 9 comments
-
Thanks for the great input! On the topic of the linter, I already planned to have a linter (particularly, the type linter/checker, but general linting can be included) literally built-in to the compiler. The philosophy I approach tool design is similar to ESLint: fully configurable (and even extensible!), but shipped with various different presets and plugins. So you can start with sane defaults, but you can tweak as much as you want. I want that built into the compiler, so that the compiler (with various CLI flags) can either be checking your code with these errors, or even run in "silent" mode with all these rules muted. I even imagine that building the linter into the compiler is sort of like having a macro-like metaprogramming for the compiler. Perhaps there's even an embedded syntax for that!? Not sure, but would be interesting to explore. Moreover, I want the Foi compiler to be able to "export" all the type information it gathers, both the types that are explicitly annotated, and especially all the type info that was type-inferred during compilation. Ideally, you'd be able to inspect these types, and then tweak the code to correct any inferences that Foi got wrong. As for other tools like dependency manager and test-runner... I'm quite OK with having those kinds of tools "officially included" in the compiler distribution. But I do think they should be separate tools rather than built into the compiler itself. I haven't really given any thought yet to use ecosystem tools, so there's a wide open path for contributions from others if anyone is interested. :) |
Beta Was this translation helpful? Give feedback.
-
Just wanted to chip in my two cents regarding the code-format: What do you think of rust being very strict in its formatter-configuration (rustfmt) compared to ESLint (which acts both as formatter and linter...) which you can configure the way you want? Although its nice being able to establish whatever code-style you prefer I for myself learned that, in the end, it's somewhat just a matter of using it long enough to feel natural to work with and that with this, it's in some way easier for everyone if there is one formatter with one configuration (maybe with 1/2 options if there is a concrete reason for it) for all projects. I think that, at least for rust, it worked out pretty good. Not sure if this would be something for Foi? |
Beta Was this translation helpful? Give feedback.
-
Philosophically, I am dispositioned to provide good strong defaults/presets, but I don't like tools that remove flexibility. I tend to think these tools are trying to solve communication problems (among humans) by avoiding the need for communication. We could argue that the default preset for Foi might be quite strict and opinionated. But I don't know if I can accept a "no need for config" type of mentality as a way to limit folks. |
Beta Was this translation helpful? Give feedback.
-
Gotchya, thanks! I wasn't thinking that these kind of mentalities / tools somewhat remove the need for communicating a setup / convention entirely... I guess as always - the easiest solution is not the "best", at least not for those who should be working together on something in this case. And pre-defining everything to avoid discussion is not a solution :) |
Beta Was this translation helpful? Give feedback.
-
Can we please call the package manager "foist"? ;-) |
Beta Was this translation helpful? Give feedback.
-
presented without comment (for now) https://medium.com/@sdboyer/so-you-want-to-write-a-package-manager-4ae9c17d9527 |
Beta Was this translation helpful? Give feedback.
-
For the compiler part, it would be cool if it could transpile into C (as well as JavaScript). My interest in that is purely academic. |
Beta Was this translation helpful? Give feedback.
-
@jzombie can you elaborate more on why that is interesting (to you)? The current plan is not really to transpile, but to full-on compile to WASM. |
Beta Was this translation helpful? Give feedback.
-
@getify The WASM compile would be sufficient enough for my interests. I'm merely trying to learn more about tokenization and syntax parsing. |
Beta Was this translation helpful? Give feedback.
-
I'd like to get a word in early to say that I like the idea of conventions over configurations, which goes against the JS way where you have to find the right library to do what you want.
You have an opportunity to include compiler (assuming it compiles), code formatter, linter, dependency manager, and test runner. This is not related to the language directly but it is in the essence of the language to say, batteries included, and choices are already made. This makes it easiest to get started.
I am more talking about sane defaults where those who like conventions over configurations can just get started easily. Those who like to configure can do so to their hearts content.
Beta Was this translation helpful? Give feedback.
All reactions