Giter Club home page Giter Club logo

aria's People

Contributors

fadion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

aria's Issues

Readme Typos

Read through the entire Readme and came across a few typos:

  1. Under "Aria Language" section:

If features mutable and immutable values

It features...

  1. Under "Type Conversion" section:

Converting between types is handle in a few ways

handled in a ...

  1. Under "Closures" section:

Some would prefer more explicit way of calling:

... prefer a more explicit ...

That is all I could find, provided that I was more focused on the content than on the grammar :)

Immutability and variable modification

First of all, nice work. Love the clean syntax.

I do like the idea of immutable values, but you are creating immutable variables which IMHO is very limiting. Basically that makes each let create a constant. You need immutable values, not immutable variables.

I now cannot change x at all? Not even increment it? How can you make a program to get sum of numbers? You can't create a new variable for each iteration of the summing loop.

string compare issue

In interpreter.go, function runStringInfix:

func (i *Interpreter) runStringInfix(operator string, left, right string) (DataType, error) { 
	switch operator { 
	case "+": // Concat two strings. 
		return &StringType{Value: left + right}, nil 
	case "<": 
		return i.nativeToBoolean(len(left) < len(right)), nil 
	case "<=": 
		return i.nativeToBoolean(len(left) <= len(right)), nil 
	case ">": 
		return i.nativeToBoolean(len(left) > len(right)), nil 
	case ">=": 
		return i.nativeToBoolean(len(left) >= len(right)), nil 
	case "==": 
		return i.nativeToBoolean(left == right), nil 
	case "!=": 
		return i.nativeToBoolean(left != right), nil 
	case "..": // Range between two characters. 
		return i.runRangeStringInfix(left, right) 
	default: 
		return nil, fmt.Errorf("Unsupported String operator '%s'", operator) 
	} 
} 

You used len(str1) and len(str2) to compare two strings, this way is not very correct. In go, we could simply use str1<str2, str1>=str2, etc. that would do the compare.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.