Thanks for your interest in ATS!

Will take into consideration your suggestions.

The current implementation of ATS3 is done in a way that
should make it straightforward for other people to implement
tools performing code analysis. My hope is that such tools can
be distributed independently and shared by the ATS community.
For instance, the compiler flags you mentioned can be supported
in this way.

On Wednesday, December 4, 2019 at 2:23:13 AM UTC-5, rodol wrote:
>
> Hello, I have been learning ATS2, and wanted to chime in. I'm a bit late 
> to the party, but I've given these quite a bit of thought. I have more, but 
> I need to learn more about ATS2 before being sure enough to suggest them. 
> I'll be asking a few things soon :)
>
> I don't have an issue with how 'weak' the type inference is in ATS2. I 
> really like how dependent types are handled in ATS2, and the level of 
> expressiveness possible with them. I hope changing the template system to 
> use simpler types doesn't cripple it.
>
> Here are my ideas for ATS3, sorted from more important to less important 
> in each of the 3 categories, numbered for easy reference:
>
>
>
> a. Things to add:
>
> 1. Compiler flags. Examples:
>     --wproof: warn about un`primplement`ed `prfun`s
>     --waxiom: warn about axioms
>     --wtco: warn about recursive functions that can't be TCO'd.
>     --wunused: warn about locals that are never called
>     --wstrict: treat `case` as `case+`, `val` as `val+`
>     --wsafe: warn about `$UNSAFE` code
>     --wall: enable some useful subset of the above warnings
>     --wextra: enable all above warnings
>     --werror: treat warnings as errors
>
> 2. Allow using compiler flags as pragmas at the top of a file, like `#warn 
> tco` to warn about any unTCO'd function bodies in the file, or `#warn all` 
> for --wall. (could also be `#pragma wall` for flexibility later?)
>
> 3. Standardized attribute system to label functions with compiler flags or 
> other information/tags, like C# attributes or Java annotations. The closest 
> thing to this in ATS2 is the -<keyword> pattern.
>
> 4. Have metaprogramming at the level of compile-time code generation. For 
> example, implementing a static function that generates optimal matrix 
> multiplication for a given callsite's matrix dimensions should be possible. 
> Maybe this is already possible in ATS2 and I just don't know it. This would 
> depend on (haha) dependent types to know the dimensions of the matrices at 
> the callsite. This paper is interesting, I have not read all of it but it 
> may be relevant: 
> https://www.ccs.neu.edu/home/stchang/pubs/ckg-popl2017.pdf
>
>
>
> b. Things to change:
>
> 1. Rename `praxi` to `axiom`, `prfun` to `claim`, `primplement` to `proof`.
>
> 2. Force function forward declaration like in haskell, splitting the 
> parameter types from parameter names. Pattern matching isn't necessary, the 
> syntax is just nicer this way and separates concerns. The caller only needs 
> to know the *type* signature.
>
> 3. Unite `fun` and `fn`. I do not know why this distinction exists, does 
> it make the compiler faster somehow to know that the function may call 
> itself?
>
>
>
> c. Things to remove:
>
> 1. Remove `andalso` and `orelse`. `&&` and `||` are standard in 
> programming, we don't need more keywords to mentally keep track of.
>
> 2. Remove `implmnt` and `primplmnt` variants. `fn`/`fun` already sets 
> precedent for spelling variations changing meaning, but here the variation 
> doesn't.
>
> 3. Remove `(**)` comment syntax. It prevents us from using * as prefix 
> function, like `(*) 2 1`. `/**/` does not have this issue.
>
> 4. Remove mutual function declarations with `and` in favor of private 
> local functions that call their parents. The second function in a mutual 
> declaration can't be referenced externally anyways, so it would be easier 
> to understand the scope. `fnx` is unneeded after a.2
>
> 5. Remove `~` unary negation. I don't mean replace it with `-`, I mean 
> take it out completely. Just subtract from 0 instead. `~` should be 
> reserved for bitwise negation, and `-` for subtraction.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ats-lang-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/53286644-7872-4828-8e5c-9f733b401245%40googlegroups.com.

Reply via email to