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

merging "long" and "int" datatypes #25

Open
julochrobak opened this issue Dec 19, 2012 · 0 comments
Open

merging "long" and "int" datatypes #25

julochrobak opened this issue Dec 19, 2012 · 0 comments

Comments

@julochrobak
Copy link
Member

Bandicoot currently supports three numeric data types (int, long, real) - http://bandilab.org/specification.html#primitive_types

Two different data types for signed integers together with strictly explicit type conversions introduces some overhead and complexity when writing expressions and using functions such as Time.Now or String.Index.

For example, the following code requires explicit type conversions to work

type TimeWindow {
    start long,    # start of the window as a unix timestamp
    duration int  # duration in seconds
}

fn InPast(in TimeWindow) TimeWindow {
    return select (Time.Now > start + (long duration)) in;
}

This issue suggests to remove the "long" data type and leave only 64-bit version of "int" data type.

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

1 participant