Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create standard library #9

Open
minchingtonak opened this issue Oct 16, 2020 · 2 comments
Open

Create standard library #9

minchingtonak opened this issue Oct 16, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@minchingtonak
Copy link
Contributor

minchingtonak commented Oct 16, 2020

One of the most important elements of making Basil more accessible to new users is providing those users with access to useful library functions. In its first form, this will look like:

  • data structure operations (lists, strings, etc.)
  • math
  • control structures (for-in loops, etc.)

Each separate category of operation will be defined in it's own file, allowing users to import library functions as they're needed.

The overall goal for the Basil standard library is to be easy to use and to have enough breadth that it covers the majority of programmers' average use cases.

@minchingtonak minchingtonak added the enhancement New feature or request label Oct 16, 2020
@minchingtonak minchingtonak added this to the 0.2 milestone Oct 16, 2020
@minchingtonak minchingtonak self-assigned this Oct 16, 2020
@elucent elucent removed this from the 0.2 milestone Oct 4, 2021
@elucent
Copy link
Contributor

elucent commented Oct 4, 2021

This deserves deeper discussion and evaluation - how much of a stdlib do we consider necessary for 1.0? Adding this to the 1.0 release column, but it might be reasonable to split this up.

@dumblob
Copy link

dumblob commented Oct 4, 2021

I think that the stdlib which will be forever shipped (and forever maintained) with Basil shall be really minimal (let's call it a tier 1 stdlib) and have strong focus on "meta" things.

What I mean by "meta" is to meticulously define and technically enforce "namespace" division and related release & distributed (among different groups with different goals - e.g. commercial sector vs academia vs consumers etc.) management.

This is to avoid the disaster which happened to the Tcl ecosystem. I.e. people wanted to write lots of Tcl extensions and modules but because of missing coherent structure how such separately (totally in isolation) developed code should mix with other such code, Tcl struggled for about 20 years to slowly and very painfully reintegrate a (rather small) subset of the extensions & modules into the official distribution.

  1. The concept of from future import X, Y, Z or alike is inevitable and has to be strictly enforced by technical means. It seems to be so far the best solution to the problem of getting a new behavior of the lang only in strictly delimited parts of the program.
  2. There has to be a solution to allow development of several (many) "different stdlibs" designated as "tier 2 stdllibs" and to allow mixing them safely (including mixing two versions of the same tier 2 stdlib project).
  3. The minimal standard library (tier 1) should thus comprise of macros which meet a certain level of quality (e.g. support many different platforms, guarantee compile time error if the Basil version they're being tried to run on is incompatible, have tests, etc.). Over time this'll accumulate a small amount of carefully chosen stuff from tier 2 stdlibs, but hopefully not much.
    The point is to always have a way to say suddenly STOP and simply switch to an alternative tier 2 stdlib as the new default.
  4. There shall be one chosen tier 2 stdlib to be distributed with Basill by default but it should be made explicit that it's a "flavored Basil" and that this "flavor" can change any time (among major versions of course; not in minor nor bugfix releases).
  5. Maybe use SemVer?

Thoughts?


Imagine I would want to create a tier 2 stdlib which would transform Basil into a fully dataflow language (e.g. a shell-like language with pipes everywhere and no traditional sequential code). So in other words, nothing in tier 1 must prevent me from doing this without having to fight some weird tier 1 (anti)features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants