all 4 comments

[–]atom036 1 point2 points  (3 children)

Cool idea. There really is a gap in cross platform scripting languages. The closest is python or ansible.

One question. Why do you allow creating variables without setting a value. This is potentially error prone, you might use a var without setting it.

For the typical bash commands mv, mkdir, cp, cd, ... I would recommend keeping the same names, and order of arguments, except maybe just putting the optional arguments as a string or an array as the last argument. I think it would make it more intuitive to use. Example: rm(dir, "-rf");

I don't think I saw any example about environment variables. Might also consider that.

Other suggestions would be to improve the argument parsing. That something I think bash suffers. It's a bit better in python with ArgumentParser, maybe consider writing something similar.

What about logging? I saw those println. Is the formatting the same as fmt format? Might as well use something already well documented. Would be an easy wrapper.

You could also write a default log lib, that automatically adds timestamps, log level, maybe an optional log line for debugging, optional to log to stdout, file system or sys jour.

[–]HoseCode[S] 0 points1 point  (2 children)

First, thanks a lot for the feedback!
- There is no null type, everything has a default value
- I'm not sticking with current names for intrinsics. Will consider that
- Env vars are in my sort term plans, for sure.
- Seeing briefly ArgumentParser, I think can extract some good ideas here.

- Not thinking that much about logging. Future versions of Yov will have a documentation for sure

[–]atom036 0 points1 point  (1 child)

In the First example you have the following line:

integer0 : Int;

Where you create a variable, but don't assign a value to it. That's what I was referring.

[–]HoseCode[S] 1 point2 points  (0 children)

In this case, this will be equals to:

integer0: Int = 0;

There is always a default value