Crystal: Feature Request: Mutable NamedTuple

Created on 21 Sep 2017  路  4Comments  路  Source: crystal-lang/crystal

Mutable NamedTuple are easy to understand, define (user = {count: Int32, name: String}) and use, especially for Developers coming from Nodjes/Javascript.

In my opinion, many Nodejs developers would like to switch after V1 release as less memory/CPU usage and performance gains will be huge.

Most helpful comment

Hi, I'm developer coming from Python world.

I think currently we have inmutable and mutable sequences:

Inmutable sequences: just like Python Tuples, is a bit difficult to understand by Ruby a JS developers because those languages don't have inmutable sequences by default.

Mutable sequences: just like any other dynamic sequence in almost all imperative programming languages.

I think we just need a better documentation :wink:

All 4 comments

Hi, I'm developer coming from Python world.

I think currently we have inmutable and mutable sequences:

Inmutable sequences: just like Python Tuples, is a bit difficult to understand by Ruby a JS developers because those languages don't have inmutable sequences by default.

Mutable sequences: just like any other dynamic sequence in almost all imperative programming languages.

I think we just need a better documentation :wink:

I am also from a JS background. I think the confusion comes from the braces { }, us JS devs love our braces :wink:

Hashes just don't look like js objects, and the use of fat arrows, look either like an ES2015 function definition or a PHP array.

As @faustinoaq says, this is more a docs issue.

Thanks @faustinoaq and @crisward for addressing this. Closing.

Was this page helpful?
0 / 5 - 0 ratings