Comments (4)
LGTM, I have some questions to clarify:
- So a file say
x/y/z1.dora
could be in packagefoo::bar
, whilex/y/z2.dora
might be in packagesome::other
? Modules are completely distinct from the file structure? Not saying this has to be the case, but we could think about something like this. E.g.module some;
includes all *.dora-files in the directorysome
. - How would you invoke Dora with multiple source files. Right now Dora can be started with either exactly one input file or directory. When we need multiple input files we probably need changes to the command line parser and use
--
to separate input files from the arguments to the Dora program.
from dora.
Forgot this: I guess we should then also discuss how we want to include libraries into Dora
from dora.
So a file say x/y/z1.dora could be in package foo::bar, while x/y/z2.dora might be in package some::other? Modules are completely distinct from the file structure? Not saying this has to be the case, but we could think about something like this. E.g. module some; includes all *.dora-files in the directory some.
I think what's important for me is that one can use a single folder with various files with potentially different module declarations. It might make sense to support both, a flat hierarchy for small things like scripts and a full blown hierarchy where the folder structure follows the module declarations (and the compiler would warn if a file was incorrectly placed somewhere else).
But that's coming from the perspective of someone who finds Rust's approach rather unintuitive and confusing. :-)
How would you invoke Dora with multiple source files. Right now Dora can be started with either exactly one input file or directory. When we need multiple input files we probably need changes to the command line parser and use -- to separate input files from the arguments to the Dora program.
I guess we should then also discuss how we want to include libraries into Dora
I imagine that every library would consist of either flat files or a directory hierarchy combined with a metadata file that defines the name, author, version, dependencies and so on. Now put those things into a tar or zip file.
I propose calling such an archive a crate (for the lack of a better name).
Depending on code in Dora would work on the level of those crates. You could distribute those archives and refer to them by the crate name.
So you could say dora --crate my.module
and Dora would resolve the dependencies specified in your metadata file of your crate my.module
and run your crate.
One important thing here is that dependencies should not be transitive: If crate B depended on crate A, and crate C would depend on crate B, it wouldn't get crate A "for free", it would need to explicitly depend on it.
I would probably push this so far that dora would be distributed as a single binary, without even the standard library, which would be a crate like every other library. This means the standard library crate could be updated on its own, and it would keep us honest in terms of not having a dependency mess inside our core libraries.
from dora.
This is resolved/outdated.
from dora.
Related Issues (20)
- Unified Condition Expressions HOT 1
- panic: enum value and `is` HOT 3
- Extending the reach of enums HOT 1
- `toStringHex` and `toStringBinary` strip off leading zeros HOT 1
- Consider turning asserts in @test annotated methods into soft asserts
- Allow defining and calling methods without parentheses
- `--emit-ast` doesn't do anything HOT 2
- The JIT implementation of dora is very cool HOT 1
- reinstate class syntax
- replace `fn` keyword with `fun` keyword
- reinstate `=` for function definition
- implement named parameters
- implement string hash caching
- implement definitional enums
- implement modules (singletons and holders of static functions)
- remove unary operators
- remove bitshift operators
- implement unified condition expressions
- replace procedure syntax with functions having return type `Unit` HOT 1
- How lazy compilation is protected in case of multiple threads? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dora.