'let' #1497
Replies: 8 comments 5 replies
-
the equivalents are:
I prefer type |
Beta Was this translation helpful? Give feedback.
-
why? |
Beta Was this translation helpful? Give feedback.
-
yeah I mean why use 'let' for constants. Why not 'const' or its synonyms ? |
Beta Was this translation helpful? Give feedback.
-
I do not think your topic has a lot of interest if you do not explain why you do not like it. I personnaly like it a lot. |
Beta Was this translation helpful? Give feedback.
-
Since Carbon seems to be influenced quite a bit by Kotlin and even aims to do similar things as Kotlin did for the Java world, I'd suggest sticking more to Kotlin syntax. |
Beta Was this translation helpful? Give feedback.
-
This is purely a point about aesthetics, but I like that let and var are the same length and would allow rows of variable names to line up, whether constant or mutable. I suspect this is also one of the reasons to prefer name on the left and type on the right, assuming the name is more important than the type in many cases. |
Beta Was this translation helpful? Give feedback.
-
var, let and const is surely going to cause confusion for folks who only have javascript knowledge. :) |
Beta Was this translation helpful? Give feedback.
-
After researching it a bit, it does make a lot more sense. Thanks for all the comments. |
Beta Was this translation helpful? Give feedback.
-
'let' could definitely be one of the reasons to avoid the language for me:D
Beta Was this translation helpful? Give feedback.
All reactions