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

Features worth having #14

Open
antoyo opened this issue Mar 31, 2019 · 4 comments
Open

Features worth having #14

antoyo opened this issue Mar 31, 2019 · 4 comments

Comments

@antoyo
Copy link

antoyo commented Mar 31, 2019

Hi.
I read there that targeting LLVM is the plan.
If that is the case, we would probably need the following features in order to replace inline C:

  • inline assembly (for doing stuff like syscalls).
  • attribute to specify the ABI of a function.
  • maybe something for alignment and packing of records.

I can't think of any other features worth having, but I'll add them to this post as I think of them.

Thanks.

@atlv24
Copy link

atlv24 commented Dec 1, 2019

+1 for inline assembly

@kindlychung
Copy link

A package manager like cargo for Rust: https://github.com/rust-lang/cargo

@okeuday
Copy link

okeuday commented Jun 12, 2022

It should be helpful to have string concatenation similar to the C preprocessor. For example, it seems possible that ATS2 could support functions like:

extern fn
string0_concat
    (s1: string,
     s2: string):<fun0>
    string
extern fn
string1_concat {n1,n2:nat}
    (s1: string n1,
     s2: string n2):<fun0>
    string(n1 + n2)

However, it would need a special type for a string literal (a view type?). The goal would be to avoid the need for allocation, so you could concatenate something like $mylocation with a string literal. This idea should be beneficial when combined with templates that get evaluated at compile-time.

@toastal
Copy link

toastal commented Jun 4, 2024

While on the topic of general Unicode support in strings (& comments)… Unicode identifiers & fixity operators support.

The old American Standard Code for Information Interchange (ASCII) is highly limiting when communicating in multiple languages or certain concepts that already have established Unicode symbols. I don’t mean dash greater than (->), I mean rightwards arrow () & conveniently there is U+2192 which is precisely what I mean. Nor do I think all identifier should be limited to the English language which tends to lop off accents in the Latin alphabet & the majority of the world uses languages that don’t use the Latin alphabet altogether--or even bicameral scripts.

Before compiler extensions from OCaml were removed, ocaml-m17n had some notable solutions to tackle some common issues.

Notable precedence: theorm proving: Agda, Lean; functional, ML-family: Haskell (with {-# LANGUAGE UnicodeSyntax #-}), PureScript; other languages: APL, Raku

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

No branches or pull requests

5 participants