After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793748 - Add type inference syntax for const values
Add type inference syntax for const values
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: general
unspecified
Other All
: Normal enhancement
: 2.0
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2018-02-23 12:25 UTC by Michael 'Mickey' Lauer
Modified: 2018-05-22 16:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael 'Mickey' Lauer 2018-02-23 12:25:32 UTC
For constant values, Vala can not use type inference. I propose to add the keyword 'let' that works in the same spirit as 'var', just creating a constant type, i.e.:

let x = 10;

The choice 'let' is analog to other languages, such as Swift, and also matches fine with mathematical articles, where it is often used to describe constant values as well.
Comment 1 GNOME Infrastructure Team 2018-05-22 16:00:52 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/619.